OSDN Git Service

Thanos did someting
[bytom/vapor.git] / crypto / ed25519 / chainkd / serialize_test.go
diff --git a/crypto/ed25519/chainkd/serialize_test.go b/crypto/ed25519/chainkd/serialize_test.go
deleted file mode 100644 (file)
index 142549d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-package chainkd
-
-import (
-       "bytes"
-       "encoding/hex"
-       "encoding/json"
-       "reflect"
-       "testing"
-)
-
-func TestMarshalingFuncs(t *testing.T) {
-       xprv, err := NewXPrv(nil)
-       if err != nil {
-               t.Fatal(err)
-       }
-
-       want := make([]byte, hex.EncodedLen(len(xprv.Bytes())))
-       hex.Encode(want, xprv.Bytes())
-
-       got, err := json.Marshal(xprv)
-       if err != nil {
-               t.Fatal(err)
-       }
-       // First and last bytes are "
-       if !reflect.DeepEqual(want, got[1:len(got)-1]) {
-               t.Errorf("marshaling error: want = %+v, got = %+v", want, got)
-       }
-
-       secXprv := new(XPrv)
-       err = json.Unmarshal(got, &secXprv)
-       if err != nil {
-               t.Fatal(err)
-       }
-       if !bytes.Equal(xprv[:], secXprv[:]) {
-               t.Errorf("unmarshaling error: want = %+v, got = %+v", xprv, secXprv)
-       }
-}