From 1fa1d47e6353548a88d636cf7c3f4b0547ca3dbf Mon Sep 17 00:00:00 2001 From: Christian Schmied Date: Thu, 26 Sep 2024 11:53:37 +0200 Subject: [PATCH] slight modification of tests --- Globbing_linux_test.go | 1 + Globbing_windows_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/Globbing_linux_test.go b/Globbing_linux_test.go index 26095e4..11d9a0b 100644 --- a/Globbing_linux_test.go +++ b/Globbing_linux_test.go @@ -18,6 +18,7 @@ func TestGetGlobbedDir(t *testing.T) { assertThat(t, extractGlobbedDir("/foo/bar/*", "/foo/bar/myDir/myFile.txt"), "myDir") assertThat(t, extractGlobbedDir("/foo/bar/*/baz", "/foo/bar/myDir/baz/myFile.txt"), "myDir/baz") } + func assertThat[E comparable](t *testing.T, actual E, expected E) { t.Helper() if actual != expected { diff --git a/Globbing_windows_test.go b/Globbing_windows_test.go index 82da3f1..ba2b924 100644 --- a/Globbing_windows_test.go +++ b/Globbing_windows_test.go @@ -12,6 +12,7 @@ func TestGetGlobRoot(t *testing.T) { assertThat(t, getGlobRoot("foo\\bar\\*"), "foo\\bar") } + func assertThat[E comparable](t *testing.T, actual E, expected E) { t.Helper() if actual != expected {