Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestDiscard (0.08 sec)

  1. src/log/log_test.go

    	if n := strings.Count(output, "Header"); n != 2 {
    		t.Errorf("expected 2 headers, got %d", n)
    	}
    	if n := strings.Count(output, "\n"); n != 2 {
    		t.Errorf("expected 2 lines, got %d", n)
    	}
    }
    
    func TestDiscard(t *testing.T) {
    	l := New(io.Discard, "", 0)
    	s := strings.Repeat("a", 102400)
    	c := testing.AllocsPerRun(100, func() { l.Printf("%s", s) })
    	// One allocation for slice passed to Printf,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 21 20:04:37 UTC 2023
    - 7.4K bytes
    - Viewed (0)
Back to top