1 files changed,
9 insertions(+),
0 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2026-02-18 22:33:09 +0200
Change ID:
muksutoqousruszlwwxqqwkpqspurxvu
Parent:
9f2c321
M
is/is.go
@@ -17,6 +17,15 @@ tb.Errorf("expected: %#v, got: %#v", expected, got)
} } +// NotEqual asserts that two values are not equal. +func NotEqual[T any](tb testing.TB, expected, got T) { + tb.Helper() + + if areEqual(expected, got) { + tb.Errorf("expected values to be different, but both are: %#v", got) + } +} + // Err asserts error conditions with flexible expected values: // - nil: asserts no error occurred // - string: asserts error message contains the string