aboutsummaryrefslogtreecommitdiff
path: root/pkg/testkit
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/testkit')
-rw-r--r--pkg/testkit/testkit.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/testkit/testkit.go b/pkg/testkit/testkit.go
index 526e1b3..3cc4afd 100644
--- a/pkg/testkit/testkit.go
+++ b/pkg/testkit/testkit.go
@@ -9,18 +9,21 @@ import (
)
func TestValue[T any](t *testing.T, method string, want, got T) {
+ t.Helper()
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("%s() mismatch (-want +got):\n%s", method, diff)
}
}
func TestFatalError(t *testing.T, method string, err error) {
+ t.Helper()
if err != nil {
t.Fatalf("%s() fatal error : %+v", method, err)
}
}
func TestError(t *testing.T, method string, want, got error) {
+ t.Helper()
if !equalError(want, got) {
t.Errorf("%s() err mismatch want: %+v got %+v", method, want, got)
}