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{})
| 880 | // Pointer variable equality is determined based on the equality of the |
| 881 | // referenced values (as opposed to the memory addresses). |
| 882 | func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { |
| 883 | if h, ok := t.(tHelper); ok { |
| 884 | h.Helper() |
| 885 | } |
| 886 | if err := validateEqualArgs(expected, actual); err != nil { |
| 887 | return Fail(t, fmt.Sprintf("Invalid operation: %#v != %#v (%s)", |
| 888 | expected, actual, err), msgAndArgs...) |
| 889 | } |
| 890 | |
| 891 | if ObjectsAreEqual(expected, actual) { |
| 892 | return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...) |
| 893 | } |
| 894 | |
| 895 | return true |
| 896 | } |
| 897 | |
| 898 | // NotEqualValues asserts that two objects are not equal even when converted to the same type |
| 899 | // |