aboutsummaryrefslogtreecommitdiffstats
path: root/trie
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2014-11-15 05:19:50 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2014-11-15 05:19:50 +0800
commite6e468ef59740b88f2de0722e13d0d13a1de1940 (patch)
tree35897bbe460f1c7336f2c9d2039b4d94ae434b22 /trie
parent2a9fc7baa908d64ff1ddae44641024114d3ec88d (diff)
parent313cfba7d43529db647789ae826bc426d9da7de3 (diff)
downloadgo-tangerine-e6e468ef59740b88f2de0722e13d0d13a1de1940.tar
go-tangerine-e6e468ef59740b88f2de0722e13d0d13a1de1940.tar.gz
go-tangerine-e6e468ef59740b88f2de0722e13d0d13a1de1940.tar.bz2
go-tangerine-e6e468ef59740b88f2de0722e13d0d13a1de1940.tar.lz
go-tangerine-e6e468ef59740b88f2de0722e13d0d13a1de1940.tar.xz
go-tangerine-e6e468ef59740b88f2de0722e13d0d13a1de1940.tar.zst
go-tangerine-e6e468ef59740b88f2de0722e13d0d13a1de1940.zip
Merge branch 'develop' of https://github.com/tgerring/go-ethereum into tests
Conflicts: p2p/messenger_test.go trie/trie_test.go
Diffstat (limited to 'trie')
-rw-r--r--trie/trie_test.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/trie/trie_test.go b/trie/trie_test.go
index 98d02c83e..43cd6c145 100644
--- a/trie/trie_test.go
+++ b/trie/trie_test.go
@@ -327,14 +327,11 @@ func (s *TrieSuite) TestBeginsWith(c *checker.C) {
c.Assert(BeginsWith(b, a), checker.Equals, true)
}
-func TestItems(t *testing.T) {
- _, trie := NewTrie()
- trie.Update("A", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
-
+func (s *TrieSuite) TestItems(c *checker.C) {
+ s.trie.Update("A", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
exp := "d23786fb4a010da3ce639d66d5e904a11dbc02746d1ce25029e53290cabf28ab"
- if bytes.Compare(trie.GetRoot(), ethutil.Hex2Bytes(exp)) != 0 {
- t.Errorf("Expected root to be %s but got", exp, trie.GetRoot())
- }
+
+ c.Assert(s.trie.GetRoot(), checker.DeepEquals, ethutil.Hex2Bytes(exp))
}
/*