change assertEq check

This commit is contained in:
ebauer 2021-06-23 16:00:41 +02:00
parent 5f0b34250c
commit 4fe8e6f172
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ func assertErr(t *testing.T, err error) {
func assertEq(t *testing.T, msg string, exp interface{}, act interface{}) { func assertEq(t *testing.T, msg string, exp interface{}, act interface{}) {
t.Helper() 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) t.Fatalf("failed to test for %s. exp=[%v] but act=[%v]", msg, exp, act)
} }
} }