MCPcopy
hub / github.com/deepflowio/deepflow / TestByteBufferUse

Function TestByteBufferUse

server/libs/utils/byte_buffer_test.go:23–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21)
22
23func TestByteBufferUse(t *testing.T) {
24 bytes := &ByteBuffer{quota: 10}
25 buf := bytes.Use(10)
26 if len(buf) != 10 || len(bytes.Bytes()) != 10 {
27 t.Error("Use函数处理不正确")
28 }
29}
30
31func TestByteBufferUseTwice(t *testing.T) {
32 bytes := &ByteBuffer{quota: 10}

Callers

nothing calls this directly

Calls 3

UseMethod · 0.95
BytesMethod · 0.95
ErrorMethod · 0.65

Tested by

no test coverage detected