aboutsummaryrefslogtreecommitdiffstats
path: root/trie/encoding_test.go
diff options
context:
space:
mode:
authorzsfelfoldi <zsfelfoldi@gmail.com>2015-11-30 20:34:19 +0800
committerzsfelfoldi <zsfelfoldi@gmail.com>2015-12-17 23:07:54 +0800
commitef422ee1e1eef831c681aaec31ce7da23b12ae6d (patch)
tree771913e23581908925e4f4b547e8a316ae89e46c /trie/encoding_test.go
parente6408617049d10a6366eef33ea9e97b58c7e30f9 (diff)
downloaddexon-ef422ee1e1eef831c681aaec31ce7da23b12ae6d.tar.gz
dexon-ef422ee1e1eef831c681aaec31ce7da23b12ae6d.tar.zst
dexon-ef422ee1e1eef831c681aaec31ce7da23b12ae6d.zip
light: implemented odr-capable trie and state structures
Diffstat (limited to 'trie/encoding_test.go')
-rw-r--r--trie/encoding_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/trie/encoding_test.go b/trie/encoding_test.go
index 061d48d58..2f125ef2f 100644
--- a/trie/encoding_test.go
+++ b/trie/encoding_test.go
@@ -57,6 +57,12 @@ func (s *TrieEncodingSuite) TestCompactHexDecode(c *checker.C) {
c.Assert(res, checker.DeepEquals, exp)
}
+func (s *TrieEncodingSuite) TestCompactHexEncode(c *checker.C) {
+ exp := []byte("verb")
+ res := compactHexEncode([]byte{7, 6, 6, 5, 7, 2, 6, 2, 16})
+ c.Assert(res, checker.DeepEquals, exp)
+}
+
func (s *TrieEncodingSuite) TestCompactDecode(c *checker.C) {
// odd compact decode
exp := []byte{1, 2, 3, 4, 5}