MCPcopy Create free account
hub / github.com/github/copilot-sdk / TestTruncBuffer_ExactMax

Function TestTruncBuffer_ExactMax

go/internal/truncbuffer/truncbuffer_test.go:19–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

17}
18
19func TestTruncBuffer_ExactMax(t *testing.T) {
20 tb := NewTruncBuffer(5)
21 tb.Write([]byte("abcde"))
22 if got := string(tb.Bytes()); got != "abcde" {
23 t.Fatalf("got %q, want %q", got, "abcde")
24 }
25}
26
27func TestTruncBuffer_OverflowSingleWrite(t *testing.T) {
28 tb := NewTruncBuffer(5)

Callers

nothing calls this directly

Calls 3

WriteMethod · 0.95
BytesMethod · 0.95
NewTruncBufferFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…