MCPcopy Index your code
hub / github.com/expr-lang/expr / validateEqualArgs

Function validateEqualArgs

internal/testify/assert/assertions.go:481–490  ·  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

479// validateEqualArgs checks whether provided arguments can be safely used in the
480// Equal/NotEqual functions.
481func validateEqualArgs(expected, actual interface{}) error {
482 if expected == nil && actual == nil {
483 return nil
484 }
485
486 if isFunction(expected) || isFunction(actual) {
487 return errors.New("cannot take func type as argument")
488 }
489 return nil
490}
491
492// Same asserts that two pointers reference the same object.
493//

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…