Assert checks that the provided argument passes the given check and calls tb.Fatal otherwise, including any Comment arguments in the failure.
BadCheckf returns an error used to report a problem with the checker invocation or testing execution itself (like wrong number or type of arguments) rather than a real Check or Assert failure.
Check checks that the provided argument passes the given check and calls tb.Error otherwise, including any Comment arguments in the failure.
CmpEquals is like DeepEquals but allows custom compare options to be passed too, to allow unexported fields to be compared.
CodecEquals returns a Checker that checks for codec value equivalence.
Commentf returns a test comment whose output is formatted according to the given format specifier and args.
ContentEquals is like DeepEquals but any slices in the compared values will be sorted before being compared.
DeepEquals returns a Checker checking equality of two values using cmp.DeepEqual.
Equals returns a Checker checking equality of two comparable values.
ErrorAs retruns a Checker checking that the error is or wraps a specific error type.
ErrorIs returns a Checker that checks that the error is or wraps a specific error value.
ErrorMatches returns a Checker checking that the provided value is an error whose message matches the provided regular expression pattern.
F2 factors a 2-argument checker function into a single argument function suitable for passing to an *Any or *All checker.
Format formats the given value as a string.
HasLen returns a Checker checking that the provided value has the given length.
Implements returns a Checker checking that the provided value implements the interface specified by the type parameter.
IsBadCheck reports whether the given error has been created by BadCheckf.
IsFalse returns a Checker checking that the provided value is false.
IsNil returns a Checker checking that the provided value is equal to nil.
IsNotNil returns a Checker checking that the provided value is not nil.
IsTrue returns a Checker checking that the provided value is true.
JSONEquals returns a Checker that checks whether a string or byte slice is JSON-equivalent to a Go value.
MapAll returns a Checker that uses checkers returned by f to check values of a map.
MapAny returns a Checker that uses checkers returned by f to check values of a map.
MapContains returns a Checker that succeeds if the given value is contained in the values of the given map, by comparing for equality.
Matches returns a Checker checking that the provided string matches the provided regular expression pattern.
Not returns a Checker negating the given Checker.
PanicMatches returns a Checker checking that the provided function panics with a message matching the provided regular expression pattern.
Patch sets a variable to a temporary value for the duration of the test.
Satisfies returns a Checker checking that the provided value, when used as argument of the provided predicate function, causes the function to return true.
SliceAll returns a Checker that uses checkers returned by f to check elements of a slice.
SliceAny returns a Checker that uses the given checker to check elements of a slice.
SliceContains returns a Checker that succeeds if the given slice contains the given element, by comparing for equality.
StringContains returns a Checker checking that the given string contains the given substring.