- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestReaderClearError (0.15 sec)
-
src/bufio/bufio_test.go
} func (r *errorThenGoodReader) Read(p []byte) (int, error) { r.nread++ if !r.didErr { r.didErr = true return 0, errFake } return len(p), nil } func TestReaderClearError(t *testing.T) { r := &errorThenGoodReader{} b := NewReader(r) buf := make([]byte, 1) if _, err := b.Read(nil); err != nil { t.Fatalf("1st nil Read = %v; want nil", err) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0)