- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestNegativeEOFReader (0.19 sec)
-
src/bufio/scan_test.go
return c, nil } return -1, io.EOF } // Test that the scanner doesn't panic and returns ErrBadReadCount // on a reader that returns a negative count of bytes read (issue 38053). func TestNegativeEOFReader(t *testing.T) { r := negativeEOFReader(10) scanner := NewScanner(&r) c := 0 for scanner.Scan() { c++ if c > 1 { t.Error("read too many lines") break } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 14.3K bytes - Viewed (0)