- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestNegativeRead (0.06 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 Sep 09 11:13:09 UTC 2025 - Last Modified: Fri Feb 07 01:08:54 UTC 2025 - 51.6K bytes - Viewed (0)