Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for mustMatchLength (0.11 sec)

  1. 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)
Back to top