assertions

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Cond_false = iota
	Cond_true
	Was_hit
	Not_hit
	Must_be_hit
	Optionally_hit
	Expecting_true
	Expecting_false
	Universal_test
	Existential_test
	Reachability_test
	Num_conditions
)
View Source
const ANTITHESIS_SDK_PACKAGE = "github.com/antithesishq/antithesis-sdk-go/assert"
View Source
const GENERATED_SUFFIX = "_antithesis_catalog.go"
View Source
const INSTRUMENTATION_PACKAGE_NAME = "github.com/antithesishq/antithesis-sdk-go/instrumentation"
View Source
const NAME_NOT_AVAILABLE = "anonymous"

Variables

This section is empty.

Functions

func GenerateExpects

func GenerateExpects(moduleName string, genInfo *GenInfo)

func IsGeneratedFile

func IsGeneratedFile(file_name string) bool

Types

type AntExpect

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

type AssertionFuncInfo

type AssertionFuncInfo struct {
	TargetFunc string
	MustHit    bool
	Expecting  bool
	AssertType string
	Condition  bool
}

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) ScanFile

func (aScanner *AssertionScanner) ScanFile(file_path string)

func (*AssertionScanner) SummarizeWork

func (aScanner *AssertionScanner) SummarizeWork()

func (*AssertionScanner) WriteAssertionCatalog

func (aScanner *AssertionScanner) WriteAssertionCatalog(edge_count int)

type GenInfo

type GenInfo struct {
	ExpectedVals               []*AntExpect
	ExpectPackageName          string
	InstrumentationPackageName string
	SymbolTableName            string
	NeedsCoverage              bool
	EdgeCount                  int
	HasAssertions              bool
	ConstMap                   map[string]bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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