assertions

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Cond_false = iota
	Cond_true
	Was_hit
	Not_hit
	Must_be_hit
	Optionally_hit
	Universal_test
	Existential_test
	Reachability_test
	Num_conditions
)

Variables

This section is empty.

Functions

func GenerateAssertionsCatalog added in v0.2.10

func GenerateAssertionsCatalog(moduleName string, genInfo *GenInfo)

func IsGeneratedFile

func IsGeneratedFile(file_name string) bool

Types

type AntExpect

type AntExpect struct {
	*AssertionFuncInfo
	Assertion string
	Message   string
	Classname string
	Funcname  string
	Receiver  string
	Filename  string
	Line      int
}

type AssertionFuncInfo

type AssertionFuncInfo struct {
	TargetFunc string
	AssertType string
	MustHit    bool
	Condition  bool
	MessageArg int
}

type AssertionHints

type AssertionHints map[string]*AssertionFuncInfo

func SetupHintMap

func SetupHintMap() AssertionHints

func (AssertionHints) HintsForName

func (m AssertionHints) HintsForName(name string) *AssertionFuncInfo

type AssertionScanner

type AssertionScanner struct {
	// contains filtered or unexported fields
}

Capitalized struct items are accessed outside this file

func NewAssertionScanner

func NewAssertionScanner(verbose bool, moduleName string, symbolTableName string) *AssertionScanner

func (*AssertionScanner) GetLogger

func (aScanner *AssertionScanner) GetLogger() *common.LogWriter

func (*AssertionScanner) HasAssertionsDefined added in v0.2.10

func (aScanner *AssertionScanner) HasAssertionsDefined() bool

func (*AssertionScanner) ScanFile

func (aScanner *AssertionScanner) ScanFile(file_path string)

func (*AssertionScanner) SummarizeWork

func (aScanner *AssertionScanner) SummarizeWork()

func (*AssertionScanner) WriteAssertionCatalog

func (aScanner *AssertionScanner) WriteAssertionCatalog(versionText string)

type GenInfo

type GenInfo struct {
	ConstMap map[string]bool

	AssertPackageName string
	VersionText       string
	CreateDate        string
	ExpectedVals      []*AntExpect
	HasAssertions     bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL