package assert

import "github.com/antithesishq/antithesis-sdk-go/assert"

Index

Functions

func Always

func Always(condition bool, message string, details map[string]any)

Assert that condition is true every time this function is called, AND that it is called at least once. This test property will be viewable in the "Antithesis SDK: Always" group of your triage report.

func AlwaysOrUnreachable

func AlwaysOrUnreachable(condition bool, message string, details map[string]any)

Assert that condition is true every time this function is called. Unlike the Always function, the test property spawned by AlwaysOrUnreachable will not be marked as failing if the function is never invoked. This test property will be viewable in the "Antithesis SDK: Always" group of your triage report.

func AssertRaw

func AssertRaw(cond bool, message string, details map[string]any,
	classname, funcname, filename string, line int,
	hit bool, mustHit bool,
	assertType string, displayType string,
	id string,
)

This is a low-level method designed to be used by third-party frameworks. Regular users of the assert package should not call it.

func Reachable

func Reachable(message string, details map[string]any)

Assert that a line of code is reached at least once. The test property spawned by Reachable will be marked as failing if this function is never called. This test property will be viewable in the "Antithesis SDK: Reachablity assertions" group.

func Sometimes

func Sometimes(condition bool, message string, details map[string]any)

Assert that condition is true at least one time that this function was called. The test property spawned by Sometimes will be marked as failing if this function is never called, or if condition is false every time that it is called. This test property will be viewable in the "Antithesis SDK: Sometimes" group.

func Unreachable

func Unreachable(message string, details map[string]any)

Assert that a line of code is never reached. The test property spawned by Unreachable will be marked as failing if this function is ever called. This test property will be viewable in the "Antithesis SDK: Reachablity assertions" group.