MCPcopy Create free account
hub / github.com/chain/Core / TestReadWriteVarstrList

Function TestReadWriteVarstrList

encoding/blockchain/blockchain_test.go:362–375  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

360}
361
362func TestReadWriteVarstrList(t *testing.T) {
363 f := func(x [][]byte) bool {
364 var buf bytes.Buffer
365 _, err := WriteVarstrList(&buf, x)
366 if err != nil {
367 return false
368 }
369 got, err := ReadVarstrList(NewReader(buf.Bytes()))
370 return testutil.DeepEqual(got, x) && err == nil
371 }
372 if err := quick.Check(f, nil); err != nil {
373 t.Error(err)
374 }
375}

Callers

nothing calls this directly

Calls 6

WriteVarstrListFunction · 0.85
ReadVarstrListFunction · 0.85
NewReaderFunction · 0.85
CheckMethod · 0.80
BytesMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected