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

Function TestHeadTailBuffer_EmptyBuffer

agent/agentproc/headtail_test.go:15–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestHeadTailBuffer_EmptyBuffer(t *testing.T) {
16 t.Parallel()
17
18 buf := agentproc.NewHeadTailBuffer()
19 out, info := buf.Output()
20 require.Empty(t, out)
21 require.Nil(t, info)
22 require.Equal(t, 0, buf.Len())
23 require.Equal(t, 0, buf.TotalWritten())
24 require.Empty(t, buf.Bytes())
25}
26
27func TestHeadTailBuffer_SmallOutput(t *testing.T) {
28 t.Parallel()

Callers

nothing calls this directly

Calls 7

OutputMethod · 0.95
LenMethod · 0.95
TotalWrittenMethod · 0.95
BytesMethod · 0.95
NewHeadTailBufferFunction · 0.92
EmptyMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected