diff --git a/check/check.go b/check/check.go index e908f2a..52c8d7a 100644 --- a/check/check.go +++ b/check/check.go @@ -28,6 +28,14 @@ func Equal(t *testing.T, expected, actual any, msgAndArgs ...any) { } } +// NotEqual compares two values for inequality. +func NotEqual(t *testing.T, expected, actual any, msgAndArgs ...any) { + t.Helper() + if equal(expected, actual) { + errMsg(t, fmt.Sprintf("Expected %v to not be %v", expected, actual), msgAndArgs...) + } +} + func equal(expected, actual any) bool { if expected == nil || actual == nil { return expected == actual