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

Function testByteBufferGetString

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

Source from the content-addressed store, hash-verified

103}
104
105func testByteBufferGetString(t *testing.T) {
106 for i := 0; i < 10; i++ {
107 expectedS := fmt.Sprintf("num %d", i)
108 b := Get()
109 b.SetString(expectedS)
110 if b.String() != expectedS {
111 t.Fatalf("unexpected result: %q. Expecting %q", b.B, expectedS)
112 }
113 Put(b)
114 }
115}
116
117func TestByteBufferGetStringSerial(t *testing.T) {
118 testByteBufferGetString(t)

Calls 4

GetFunction · 0.85
PutFunction · 0.85
SetStringMethod · 0.80
StringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…