MCPcopy
hub / github.com/stretchr/testify / validateEqualArgs

Function validateEqualArgs

assert/assertions.go:517–526  ·  view source on GitHub ↗

validateEqualArgs checks whether provided arguments can be safely used in the Equal/NotEqual functions.

(expected, actual interface{})

Source from the content-addressed store, hash-verified

515// validateEqualArgs checks whether provided arguments can be safely used in the
516// Equal/NotEqual functions.
517func validateEqualArgs(expected, actual interface{}) error {
518 if expected == nil && actual == nil {
519 return nil
520 }
521
522 if isFunction(expected) || isFunction(actual) {
523 return errors.New("cannot take func type as argument")
524 }
525 return nil
526}
527
528// Same asserts that two pointers reference the same object.
529//

Callers 3

Test_validateEqualArgsFunction · 0.85
EqualFunction · 0.85
NotEqualFunction · 0.85

Calls 1

isFunctionFunction · 0.85

Tested by 1

Test_validateEqualArgsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…