Documentation ¶
Index ¶
- Constants
- func GenerateAssertionsCatalog(moduleName string, genInfo *GenInfo)
- func IsGeneratedFile(file_name string) bool
- type AntExpect
- type AntGuidance
- type AssertionFuncInfo
- type AssertionHints
- type AssertionScanner
- func (aScanner *AssertionScanner) GetLogger() *common.LogWriter
- func (aScanner *AssertionScanner) HasAssertionsDefined() bool
- func (aScanner *AssertionScanner) ScanFile(file_path string)
- func (aScanner *AssertionScanner) SummarizeWork()
- func (aScanner *AssertionScanner) WriteAssertionCatalog(versionText string)
- type GenInfo
- type GuidanceFnType
- type GuidanceFuncInfo
- type GuidanceHints
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 IsGeneratedFile ¶
Types ¶
type AntGuidance ¶ added in v0.4.0
type AssertionFuncInfo ¶
type AssertionFuncInfo struct { TargetFunc string AssertType string MustHit bool Condition bool MessageArg int }
-------------------------------------------------------------------------------- Assertion Hints --------------------------------------------------------------------------------
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 (*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 NumericGuidanceVals []*AntGuidance BooleanGuidanceVals []*AntGuidance HasAssertions bool HasNumericGuidance bool HasBooleanGuidance bool // contains filtered or unexported fields }
type GuidanceFnType ¶ added in v0.4.0
type GuidanceFnType int
A type for writing raw assertions. GuidanceFnType allows the assertion to provide guidance to the Antithesis platform when testing in Antithesis. Regular users of the assert package should not use it.
const ( GuidanceFnMaximize GuidanceFnType = iota // Maximize (left - right) values GuidanceFnMinimize // Minimize (left - right) values GuidanceFnWantAll // Encourages fuzzing explorations where boolean values are true GuidanceFnWantNone // Encourages fuzzing explorations where boolean values are false GuidanceFnExplore )
type GuidanceFuncInfo ¶ added in v0.4.0
type GuidanceFuncInfo struct { AssertionFuncInfo GuidanceFn GuidanceFnType }
-------------------------------------------------------------------------------- Guidance Hints --------------------------------------------------------------------------------
type GuidanceHints ¶ added in v0.4.0
type GuidanceHints map[string]*GuidanceFuncInfo
func SetupGuidanceHintMap ¶ added in v0.4.0
func SetupGuidanceHintMap() GuidanceHints
func (GuidanceHints) GuidanceHintsForName ¶ added in v0.4.0
func (m GuidanceHints) GuidanceHintsForName(name string) *GuidanceFuncInfo
Click to show internal directories.
Click to hide internal directories.