- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestCapWithSliceAndWrittenData (0.14 sec)
-
src/bytes/buffer_test.go
} func TestCapWithPreallocatedSlice(t *testing.T) { buf := NewBuffer(make([]byte, 10)) n := buf.Cap() if n != 10 { t.Errorf("expected 10, got %d", n) } } func TestCapWithSliceAndWrittenData(t *testing.T) { buf := NewBuffer(make([]byte, 0, 10)) buf.Write([]byte("test")) n := buf.Cap() if n != 10 { t.Errorf("expected 10, got %d", n) } } func TestNil(t *testing.T) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0)