- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for mustMatchLength (0.13 sec)
-
pkg/log/logr_test.go
return runLogrTestWithScope(t, s, f) } func mustMatchLength(t *testing.T, l int, items []string) { t.Helper() if len(items) != l { t.Fatalf("expected %v items, got %v: %v", l, len(items), items) } } func TestLogr(t *testing.T) { t.Run("newlines not duplicated", func(t *testing.T) { lines := runLogrTest(t, func(l logr.Logger) { l.Info("msg\n") }) mustMatchLength(t, 1, lines)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 4.1K bytes - Viewed (0) -
pkg/log/scope_test.go
"error\tklog\tmy error: info\tkey=1", }, } for _, tt := range cases { t.Run(tt.expected, func(t *testing.T) { lines := runTest(t, tt.log) mustMatchLength(t, 1, lines) mustRegexMatchString(t, lines[0], tt.expected) }) } } func TestBasicScopes(t *testing.T) { s := RegisterScope("testScope", "z") cases := []struct { f func()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jan 03 17:36:09 UTC 2024 - 11K bytes - Viewed (0)