MCPcopy
hub / github.com/expr-lang/expr / NotEqual

Function NotEqual

internal/testify/assert/assertions.go:845–860  ·  view source on GitHub ↗

NotEqual asserts that the specified values are NOT equal. assert.NotEqual(t, obj1, obj2) Pointer variable equality is determined based on the equality of the referenced values (as opposed to the memory addresses).

(t TestingT, expected, actual interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

843// Pointer variable equality is determined based on the equality of the
844// referenced values (as opposed to the memory addresses).
845func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {
846 if h, ok := t.(tHelper); ok {
847 h.Helper()
848 }
849 if err := validateEqualArgs(expected, actual); err != nil {
850 return Fail(t, fmt.Sprintf("Invalid operation: %#v != %#v (%s)",
851 expected, actual, err), msgAndArgs...)
852 }
853
854 if ObjectsAreEqual(expected, actual) {
855 return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...)
856 }
857
858 return true
859
860}
861
862// NotEqualValues asserts that two objects are not equal even when converted to the same type
863//

Callers 5

NotEqualFunction · 0.92
NotEqualfFunction · 0.70
TestNotEqualFunction · 0.70
Test_truncatingFormatFunction · 0.70
NotEqualMethod · 0.70

Calls 5

validateEqualArgsFunction · 0.85
ObjectsAreEqualFunction · 0.85
SprintfMethod · 0.80
FailFunction · 0.70
HelperMethod · 0.45

Tested by 2

TestNotEqualFunction · 0.56
Test_truncatingFormatFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…