Add location unit tests (#208)

This commit is contained in:
kenc
2022-06-02 23:05:44 +08:00
committed by GitHub
parent e91b632181
commit 37a043afff
2 changed files with 95 additions and 2 deletions

View File

@@ -143,11 +143,11 @@ func TestGetOptionsMultipleKeys(t *testing.T) {
reflect.DeepEqual(result, expected)
}
func assertEqual(t testing.TB, result, expected string) {
func assertEqual[T comparable](t testing.TB, result, expected T) {
t.Helper()
if result != expected {
t.Errorf("got %s, want %s", result, expected)
t.Errorf("got %v, want %v", result, expected)
}
}