(t *testing.T)
| 25 | } |
| 26 | |
| 27 | func TestHashMarshalText(t *testing.T) { |
| 28 | hash := NewHash([32]byte{1}) |
| 29 | got, err := hash.MarshalText() |
| 30 | if err != nil { |
| 31 | t.Fatal(err) |
| 32 | } |
| 33 | |
| 34 | want := []byte("0100000000000000000000000000000000000000000000000000000000000000") |
| 35 | |
| 36 | if !bytes.Equal(got, want) { |
| 37 | t.Errorf("MarshalText(%x) = %x want %x", hash.Bytes(), got, want) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | func TestHashUnmarshalText(t *testing.T) { |
| 42 | text := []byte("0100000000000000000000000000000000000000000000000000000000000000") |
nothing calls this directly
no test coverage detected