From 6e6797eac54c3055b385ed3616f94355487736a4 Mon Sep 17 00:00:00 2001 From: Robin Willmann Date: Thu, 21 Sep 2023 14:14:51 +0200 Subject: [PATCH] fix AssertDeepEqual --- tst/assertions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tst/assertions.go b/tst/assertions.go index 7bf8999..91d66d1 100644 --- a/tst/assertions.go +++ b/tst/assertions.go @@ -21,14 +21,14 @@ func AssertNotEqual[T comparable](t *testing.T, actual T, expected T) { } } -func AssertDeepEqual[T comparable](t *testing.T, actual T, expected T) { +func AssertDeepEqual[T any](t *testing.T, actual T, expected T) { t.Helper() if reflect.DeepEqual(actual, expected) { t.Errorf("values differ: Actual: '%v', Expected: '%v'", actual, expected) } } -func AssertNotDeepEqual[T comparable](t *testing.T, actual T, expected T) { +func AssertNotDeepEqual[T any](t *testing.T, actual T, expected T) { t.Helper() if !reflect.DeepEqual(actual, expected) { t.Errorf("values do not differ: Actual: '%v', Expected: '%v'", actual, expected)