TestData-Factory [WIP]

This commit is contained in:
2022-12-09 00:13:10 +01:00
parent dd2f3baa0c
commit edfcdd1135
14 changed files with 1459 additions and 1022 deletions

View File

@@ -170,3 +170,15 @@ func unpointer(v any) any {
}
return v
}
func AssertMultiNonEmpty(t *testing.T, key string, args ...any) {
for i := 0; i < len(args); i++ {
reflval := reflect.ValueOf(args[i])
if args[i] == nil || reflval.IsZero() {
t.Errorf("Value %s[%d] is empty (AssertMultiNonEmpty)", key, i)
t.FailNow()
}
}
}