MCPcopy Create free account
hub / github.com/djherbis/buffer / TestFilePool2

Function TestFilePool2

buffer_test.go:76–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func TestFilePool2(t *testing.T) {
77 pool := NewFilePool(1024, "::~_bad_dir_~::")
78 buf := NewPartition(pool, New(0))
79 _, err := buf.Write([]byte("hello"))
80 if err == nil {
81 t.Error("an error was expected here")
82 }
83}
84
85func TestOverflow(t *testing.T) {
86 buf := NewMulti(New(5), Discard)

Callers

nothing calls this directly

Calls 4

NewFilePoolFunction · 0.85
NewPartitionFunction · 0.85
NewFunction · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…