MCPcopy Create free account
hub / github.com/valyala/bytebufferpool / testByteBufferGetPut

Function testByteBufferGetPut

bytebuffer_test.go:92–103  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

90}
91
92func testByteBufferGetPut(t *testing.T) {
93 for i := 0; i < 10; i++ {
94 expectedS := fmt.Sprintf("num %d", i)
95 b := Get()
96 b.B = append(b.B, "num "...)
97 b.B = append(b.B, fmt.Sprintf("%d", i)...)
98 if string(b.B) != expectedS {
99 t.Fatalf("unexpected result: %q. Expecting %q", b.B, expectedS)
100 }
101 Put(b)
102 }
103}
104
105func testByteBufferGetString(t *testing.T) {
106 for i := 0; i < 10; i++ {

Callers 2

Calls 2

GetFunction · 0.85
PutFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…