Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeepEqual ¶
DeepEqual checks if the actual and expected value are equal as determined by reflect.DeepEqual(), and t.Error()s otherwise.
func Equal ¶
func Equal[V comparable](t TestingT, actual, expected V) bool
Equal checks if the actual and expected value are equal according to == rules, and t.Errors() otherwise.
func ErrEqual ¶
ErrEqual checks if the actual error matches the expectation.
- If `expected` is nil, the actual error must be nil.
- If `expected` is of type error, the actual error must be exactly equal to it, or contain it in the sense of errors.Is().
- If `expected` is of type string, the actual error message must be exactly equal to it.
- If `expected` is of type *regexp.Regexp, that regexp must match the actual error message.
Types ¶
Click to show internal directories.
Click to hide internal directories.