MCPcopy Create free account
hub / github.com/chain/txvm / TestDecode

Function TestDecode

cmd/hex/main_test.go:38–50  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36}
37
38func TestDecode(t *testing.T) {
39 in := "abcd"
40
41 got, err := ioutil.ReadAll(&decodeReader{r: strings.NewReader(in)})
42 if err != nil {
43 t.Fatal(err)
44 }
45
46 want := []byte{0xab, 0xcd}
47 if !bytes.Equal(got, want) {
48 t.Errorf("decodeReader(%q) = %q want %q", in, got, want)
49 }
50}

Callers

nothing calls this directly

Calls 1

EqualMethod · 0.80

Tested by

no test coverage detected