MCPcopy
hub / github.com/kopia/kopia / TestPanics

Function TestPanics

internal/bigmap/bigmap_internal_test.go:261–273  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

259}
260
261func TestPanics(t *testing.T) {
262 ctx := testlogging.Context(t)
263
264 m, err := NewSet(ctx)
265 require.NoError(t, err)
266
267 // too short keys
268 require.Panics(t, func() { m.Put(ctx, nil) })
269 require.Panics(t, func() { m.Put(ctx, []byte{1}) })
270
271 // too long key
272 require.Panics(t, func() { m.Put(ctx, bytes.Repeat([]byte{1}, 256)) })
273}
274
275func TestMapWithoutValue(t *testing.T) {
276 ctx := testlogging.Context(t)

Callers

nothing calls this directly

Calls 4

PutMethod · 0.95
ContextFunction · 0.92
RepeatMethod · 0.80
NewSetFunction · 0.70

Tested by

no test coverage detected