Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestPeek (3.33 sec)

  1. src/bufio/bufio_test.go

    		t.Errorf("first ReadSlice(,) = %q, %v", line, err)
    	}
    	line, err = buf.ReadSlice('!')
    	if string(line) != "world!" || err != nil {
    		t.Errorf("second ReadSlice(,) = %q, %v", line, err)
    	}
    }
    
    func TestPeek(t *testing.T) {
    	p := make([]byte, 10)
    	// string is 16 (minReadBufferSize) long.
    	buf := NewReaderSize(strings.NewReader("abcdefghijklmnop"), minReadBufferSize)
    	if s, err := buf.Peek(1); string(s) != "a" || err != nil {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Nov 01 21:52:12 UTC 2024
    - 51.6K bytes
    - Viewed (0)
Back to top