MCPcopy Create free account
hub / github.com/Shopify/goose / TestCapWithSliceAndWrittenData

Function TestCapWithSliceAndWrittenData

syncio/buffer_test.go:253–260  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

251}
252
253func TestCapWithSliceAndWrittenData(t *testing.T) {
254 buf := NewBuffer(make([]byte, 0, 10))
255 buf.Write([]byte("test"))
256 n := buf.Cap()
257 if n != 10 {
258 t.Errorf("expected 10, got %d", n)
259 }
260}
261
262func TestNil(t *testing.T) {
263 var b *Buffer

Callers

nothing calls this directly

Calls 3

WriteMethod · 0.95
CapMethod · 0.95
NewBufferFunction · 0.85

Tested by

no test coverage detected