- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestNegativeRead (0.1 sec)
-
src/bufio/bufio_test.go
func (w *writeCountingDiscard) Write(p []byte) (int, error) { *w++ return len(p), nil } type negativeReader int func (r *negativeReader) Read([]byte) (int, error) { return -1, nil } func TestNegativeRead(t *testing.T) { // should panic with a description pointing at the reader, not at itself. // (should NOT panic with slice index error, for example.) b := NewReader(new(negativeReader)) defer func() {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0)