MCPcopy Index your code
hub / github.com/klauspost/compress / TestNewDecoderGood

Function TestNewDecoderGood

zstd/decoder_test.go:393–407  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

391}
392
393func TestNewDecoderGood(t *testing.T) {
394 for _, n := range []int{1, 4} {
395 t.Run(fmt.Sprintf("cpu-%d", n), func(t *testing.T) {
396 newFn := func() (*Decoder, error) {
397 return NewReader(nil, WithDecoderConcurrency(n))
398 }
399 testDecoderFile(t, "testdata/good.zip", newFn)
400 dec, err := newFn()
401 if err != nil {
402 t.Fatal(err)
403 }
404 testDecoderDecodeAll(t, "testdata/good.zip", dec)
405 })
406 }
407}
408
409func TestNewDecoderBad(t *testing.T) {
410 var errMap = make(map[string]string)

Callers

nothing calls this directly

Calls 5

WithDecoderConcurrencyFunction · 0.85
testDecoderFileFunction · 0.85
testDecoderDecodeAllFunction · 0.85
FatalMethod · 0.80
NewReaderFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…