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 {