Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestReaderLen (0.06 sec)

  1. src/bytes/reader_test.go

    		}
    		if b.String() != s {
    			t.Errorf("got string %q; want %q", b.String(), s)
    		}
    		if r.Len() != 0 {
    			t.Errorf("reader contains %v bytes; want 0", r.Len())
    		}
    	}
    }
    
    func TestReaderLen(t *testing.T) {
    	const data = "hello world"
    	r := NewReader([]byte(data))
    	if got, want := r.Len(), 11; got != want {
    		t.Errorf("r.Len(): got %d, want %d", got, want)
    	}
    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