Add location unit tests

This commit is contained in:
kencx
2022-06-02 18:55:44 +08:00
parent e91b632181
commit fdeadbb1c0
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)
}
}