- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestCapWithPreallocatedSlice (0.11 sec)
-
src/bytes/buffer_test.go
rlen := rand.Intn(len(testString)) fub := make([]byte, rlen) n, _ := buf.Read(fub) s = s[n:] } empty(t, "TestMixedReadsAndWrites (2)", &buf, s, make([]byte, buf.Len())) } 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) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0)