MCPcopy
hub / github.com/klauspost/compress / TestNewReaderRead

Function TestNewReaderRead

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

Source from the content-addressed store, hash-verified

467}
468
469func TestNewReaderRead(t *testing.T) {
470 dec, err := NewReader(nil)
471 if err != nil {
472 t.Fatal(err)
473 }
474 defer dec.Close()
475 _, err = dec.Read([]byte{0})
476 if err == nil {
477 t.Fatal("Wanted error on uninitialized read, got nil")
478 }
479 t.Log("correctly got error", err)
480}
481
482func TestNewDecoderBig(t *testing.T) {
483 if testing.Short() || isRaceTest {

Callers

nothing calls this directly

Calls 4

CloseMethod · 0.95
ReadMethod · 0.95
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…