mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-26 18:28:30 +02:00
added support for a few middlewares, added match_domain option, changed index reference prefix from $ to #, etc.
This commit is contained in:
@@ -38,6 +38,17 @@ func ExpectEqual[T comparable](t *testing.T, got T, want T) {
|
||||
}
|
||||
}
|
||||
|
||||
func ExpectEqualAny[T comparable](t *testing.T, got T, wants []T) {
|
||||
t.Helper()
|
||||
for _, want := range wants {
|
||||
if got == want {
|
||||
return
|
||||
}
|
||||
}
|
||||
t.Errorf("expected any of:\n%v, got\n%v", wants, got)
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
func ExpectDeepEqual[T any](t *testing.T, got T, want T) {
|
||||
t.Helper()
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
|
||||
Reference in New Issue
Block a user