Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ReadRune (0.05 sec)

  1. src/bufio/bufio_test.go

    	}
    }
    
    func TestUnreadRuneAtEOF(t *testing.T) {
    	// UnreadRune/ReadRune should error at EOF (was a bug; used to panic)
    	r := NewReader(strings.NewReader("x"))
    	r.ReadRune()
    	r.ReadRune()
    	r.UnreadRune()
    	_, _, err := r.ReadRune()
    	if err == nil {
    		t.Error("expected error at EOF")
    	} else if err != io.EOF {
    		t.Error("expected EOF; got", 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)
Back to top