Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestReaderZero (0.07 sec)

  1. src/bytes/reader_test.go

    	buf, err := io.ReadAll(r)
    	if err != nil {
    		t.Errorf("ReadAll: unexpected error: %v", err)
    	}
    	if got := string(buf); got != want {
    		t.Errorf("ReadAll: got %q, want %q", got, want)
    	}
    }
    
    func TestReaderZero(t *testing.T) {
    	if l := (&Reader{}).Len(); l != 0 {
    		t.Errorf("Len: got %d, want 0", l)
    	}
    
    	if n, err := (&Reader{}).Read(nil); n != 0 || err != io.EOF {
    		t.Errorf("Read: got %d, %v; want 0, io.EOF", n, err)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 8K bytes
    - Viewed (0)
Back to top