From febc96710007c255415907feaa3e9d2584a63e21 Mon Sep 17 00:00:00 2001 From: Arseny Balobanov Date: Wed, 25 Mar 2020 23:04:04 +0300 Subject: [PATCH] testequal: check that AssertEqual == !AssertNotEqual. --- testequal/assertions_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testequal/assertions_test.go b/testequal/assertions_test.go index 679ee78..545c906 100644 --- a/testequal/assertions_test.go +++ b/testequal/assertions_test.go @@ -31,6 +31,9 @@ func TestEqual(t *testing.T) { t.Run(tc.name, func(t *testing.T) { AssertEqual(t, tc.expected, tc.actual) RequireEqual(t, tc.expected, tc.actual) + + mockT := new(testing.T) + require.False(t, AssertNotEqual(mockT, tc.expected, tc.actual)) }) } } @@ -78,6 +81,9 @@ func TestNotEqual(t *testing.T) { t.Run(fmt.Sprintf("%T_%T", tc.expected, tc.actual), func(t *testing.T) { AssertNotEqual(t, tc.expected, tc.actual) RequireNotEqual(t, tc.expected, tc.actual) + + mockT := new(testing.T) + require.False(t, AssertEqual(mockT, tc.expected, tc.actual)) }) } }