- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for TestUnreadRuneError (0.11 sec)
-
src/bytes/reader_test.go
{"UnreadRune", func(r *Reader) { r.UnreadRune() }}, {"Seek", func(r *Reader) { r.Seek(0, io.SeekCurrent) }}, {"WriteTo", func(r *Reader) { r.WriteTo(&Buffer{}) }}, } func TestUnreadRuneError(t *testing.T) { for _, tt := range UnreadRuneErrorTests { reader := NewReader([]byte("0123456789")) if _, _, err := reader.ReadRune(); err != nil { // should not happen t.Fatal(err) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 8K bytes - Viewed (0) -
src/bufio/bufio_test.go
_, err := r.ReadByte() if err != io.EOF { t.Errorf("#%d: got error %v; want EOF", rno, err) } } } // Test that UnreadRune fails if the preceding operation was not a ReadRune. func TestUnreadRuneError(t *testing.T) { buf := make([]byte, 3) // All runes in this test are 3 bytes long r := NewReader(&StringReader{data: []string{"日本語日本語日本語"}}) if r.UnreadRune() == nil {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0)