From 4fe8e6f172fe12c72d6c07ba9c7df7bb378bb1b4 Mon Sep 17 00:00:00 2001 From: ebauer Date: Wed, 23 Jun 2021 16:00:41 +0200 Subject: [PATCH] change assertEq check --- helper_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper_test.go b/helper_test.go index 4175a9a..7cc717f 100644 --- a/helper_test.go +++ b/helper_test.go @@ -11,7 +11,7 @@ func assertErr(t *testing.T, err error) { func assertEq(t *testing.T, msg string, exp interface{}, act interface{}) { t.Helper() - if exp != act && exp != nil && act != nil { + if exp != act && !(exp == nil && act == nil) { t.Fatalf("failed to test for %s. exp=[%v] but act=[%v]", msg, exp, act) } }