Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comparison ¶
type Comparison = gotest.Comparison
func Contains ¶
func Contains(collection, item any) Comparison
Contains succeeds if item is in collection. The collection may be a string, map, slice, or array. See gotest.tools/v3/assert/cmp.Contains. When either item or collection is a multi-line string, the failure message contains a multi-line report of the differences.
func DeepEqual ¶
func DeepEqual(x, y any, opts ...gocmp.Option) Comparison
DeepEqual compares two values using github.com/google/go-cmp/cmp and succeeds if the values are equal. The comparison can be customized using comparison Options. See github.com/google/go-cmp/cmp.Option constructors and github.com/google/go-cmp/cmp/cmpopts.
func MarshalContains ¶
func MarshalContains(actual any, expected string) Comparison
MarshalContains converts actual to YAML and succeeds if expected is in the result.
func MarshalMatches ¶
func MarshalMatches(actual any, expected string) Comparison
MarshalMatches converts actual to YAML and compares that to expected.
func Regexp ¶
func Regexp(re any, value string) Comparison
Regexp succeeds if value contains any match of the regular expression re. The regular expression may be a *regexp.Regexp or a string that is a valid regexp pattern.