aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/types_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-12-12 19:25:59 +0800
committerFelix Lange <fjl@twurst.com>2016-12-20 21:35:26 +0800
commitadab2e16bdf24c2eaf498722187fb36c04a5376b (patch)
treef8bb3dd6aee1a79235202c86be2f8502bf293785 /rpc/types_test.go
parenta3e3235d97cd85e13609f61a9268ad06aa9843c2 (diff)
downloadgo-tangerine-adab2e16bdf24c2eaf498722187fb36c04a5376b.tar.gz
go-tangerine-adab2e16bdf24c2eaf498722187fb36c04a5376b.tar.zst
go-tangerine-adab2e16bdf24c2eaf498722187fb36c04a5376b.zip
rpc: remove HexBytes, replace all uses with hexutil.Bytes
Diffstat (limited to 'rpc/types_test.go')
-rw-r--r--rpc/types_test.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/rpc/types_test.go b/rpc/types_test.go
index 5482557b8..c2c5c6db6 100644
--- a/rpc/types_test.go
+++ b/rpc/types_test.go
@@ -71,25 +71,3 @@ func TestHexNumberMarshalJSON(t *testing.T) {
t.Fatalf("Invalid json.Marshal, expected '%s', got '%s'", exp, got)
}
}
-
-var hexBytesTests = []struct{ in, out []byte }{
- {in: []byte(`"0x"`), out: []byte{}},
- {in: []byte(`"0x00"`), out: []byte{0}},
- {in: []byte(`"0x01ff"`), out: []byte{0x01, 0xFF}},
-}
-
-func TestHexBytes(t *testing.T) {
- for i, test := range hexBytesTests {
- var dec HexBytes
- if err := json.Unmarshal(test.in, &dec); err != nil {
- t.Fatalf("test %d: can't decode: %v", i, err)
- }
- enc, _ := json.Marshal(HexBytes(test.out))
- if !bytes.Equal(dec, test.out) {
- t.Errorf("test %d: wrong decoded value 0x%x", i, dec)
- }
- if !bytes.Equal(enc, test.in) {
- t.Errorf("test %d: wrong encoded value %#q", i, enc)
- }
- }
-}