From d737f6df42f98c42d98d7bd4bad8a8c96e61d5a1 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 27 Jun 2014 21:39:46 +0200 Subject: Latest tests-related refactoring & improvments. --- trie.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'trie.cpp') diff --git a/trie.cpp b/trie.cpp index defa8787..12d2c2e3 100644 --- a/trie.cpp +++ b/trie.cpp @@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE(trie_tests) cnote << "Testing Trie..."; js::mValue v; string s = asString(contents("../../../tests/trietest.json")); - BOOST_REQUIRE_MESSAGE( s.length() > 0, "Contents of 'trietest.json' is empty. Have you cloned the 'tests' repo branch develop?"); + BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of 'trietest.json' is empty. Have you cloned the 'tests' repo branch develop?"); js::read_string(s, v); for (auto& i: v.get_obj()) { @@ -60,6 +60,7 @@ BOOST_AUTO_TEST_CASE(trie_tests) vector> ss; for (auto& i: o["in"].get_obj()) ss.push_back(make_pair(i.first, i.second.get_str())); + cnote << ss; for (unsigned j = 0; j < eth::test::fac((unsigned)ss.size()); ++j) { next_permutation(ss.begin(), ss.end()); @@ -74,7 +75,7 @@ BOOST_AUTO_TEST_CASE(trie_tests) BOOST_REQUIRE(t.check(true)); } BOOST_REQUIRE(!o["root"].is_null()); - BOOST_CHECK(o["root"].get_str() == toHex(t.root().asArray()) ); + BOOST_CHECK_EQUAL(o["root"].get_str(), toHex(t.root().asArray())); } } } -- cgit