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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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