Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestLargeReader (0.14 sec)

  1. src/bufio/scan_test.go

    	return len(p) + 1, nil
    }
    
    // Test that the scanner doesn't panic and returns ErrBadReadCount
    // on a reader that returns an impossibly large count of bytes read (issue 38053).
    func TestLargeReader(t *testing.T) {
    	scanner := NewScanner(largeReader{})
    	for scanner.Scan() {
    	}
    	if got, want := scanner.Err(), ErrBadReadCount; got != want {
    		t.Errorf("scanner.Err: got %v, want %v", got, want)
    	}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Sep 22 16:22:42 UTC 2023
    - 14.3K bytes
    - Viewed (0)
Back to top