assert

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s, contains interface{}) (bool, string)

func EndsWith

func EndsWith(s, suffix interface{}) (bool, string)

func Equal

func Equal(actual interface{}, expected interface{}) (bool, string)

func Greater

func Greater(e1 interface{}, e2 interface{}) (bool, string)

Greater asserts that the first element is greater than the second

func GreaterOrEqual

func GreaterOrEqual(e1 interface{}, e2 interface{}) (bool, string)

func In

func In(element, s interface{}) (bool, string)

func Less

func Less(e1 interface{}, e2 interface{}) (bool, string)

func LessOrEqual

func LessOrEqual(e1 interface{}, e2 interface{}) (bool, string)

func Matches

func Matches(text, expr interface{}) (bool, string)

func NoError

func NoError(err error) (bool, string)

func NotContains

func NotContains(s, contains interface{}) (bool, string)

func NotEndsWith

func NotEndsWith(s, suffix interface{}) (bool, string)

func NotIn

func NotIn(element, s interface{}) (bool, string)

func NotMatches

func NotMatches(text, expr interface{}) (bool, string)

func NotStartsWith

func NotStartsWith(s, prefix interface{}) (bool, string)

func RegexpMatch

func RegexpMatch(text string, expr string) bool

func StartsWith

func StartsWith(s, prefix interface{}) (bool, string)

Types

type AssertFunc

type AssertFunc func(expected interface{}, actual interface{}) (bool, string)

Jump to

Keyboard shortcuts

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