test: use generics in Equal function signature

This simplifies comparing a typed value against nil. Previously it was
necessary to case nil into the proper type.
This commit is contained in:
Michael Eischer
2025-11-22 22:10:46 +01:00
parent 24d56fe2a6
commit e1a5550a27
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ func TestParse(t *testing.T) {
u, err := location.Parse(registry, path)
test.OK(t, err)
test.Equals(t, "local", u.Scheme)
test.Equals(t, &testConfig{loc: path}, u.Config)
test.Equals(t, any(&testConfig{loc: path}), u.Config)
}
func TestParseFallback(t *testing.T) {