Commit e844649f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 39eb3b11
...@@ -82,6 +82,14 @@ func testPktMarshal(t *testing.T, pkt NEOCodec, encoded string) { ...@@ -82,6 +82,14 @@ func testPktMarshal(t *testing.T, pkt NEOCodec, encoded string) {
t.Errorf("%v: encodedLen = %v ; want %v", typ, n, len(encoded)) t.Errorf("%v: encodedLen = %v ; want %v", typ, n, len(encoded))
} }
buf := make([]byte, n)
pkt.NEOEncode(buf)
if string(buf) != encoded {
t.Errorf("%v: encode result unexpected:", typ)
t.Errorf("\thave: %s", hexpkg.EncodeToString(buf))
t.Errorf("\twant: %s", hexpkg.EncodeToString([]byte(encoded)))
}
// TODO encode - check == encoded // TODO encode - check == encoded
// TODO encode(smaller buf) -> panic // TODO encode(smaller buf) -> panic
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment