MCPcopy Index your code
hub / github.com/coder/coder / TestWaitBuffer_PlainBuffer

Function TestWaitBuffer_PlainBuffer

testutil/wait_buffer_test.go:260–271  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

258}
259
260func TestWaitBuffer_PlainBuffer(t *testing.T) {
261 t.Parallel()
262
263 wb := testutil.NewWaitBuffer()
264 _, err := wb.Write([]byte("hello "))
265 require.NoError(t, err)
266 _, err = wb.Write([]byte("world"))
267 require.NoError(t, err)
268
269 require.Equal(t, "hello world", wb.String())
270 require.Equal(t, []byte("hello world"), wb.Bytes())
271}

Callers

nothing calls this directly

Calls 5

WriteMethod · 0.95
StringMethod · 0.95
BytesMethod · 0.95
NewWaitBufferFunction · 0.92
EqualMethod · 0.45

Tested by

no test coverage detected