diff options
author | Gav Wood <i@gavwood.com> | 2014-06-28 03:39:46 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2014-06-28 03:39:46 +0800 |
commit | d737f6df42f98c42d98d7bd4bad8a8c96e61d5a1 (patch) | |
tree | fccd73433f1d920e2e87cc28d6b2ad6407cd0d2a /trie.cpp | |
parent | 0b6763ddc15bc9a6311d1378a704f69cd4cbd976 (diff) | |
download | dexon-solidity-d737f6df42f98c42d98d7bd4bad8a8c96e61d5a1.tar.gz dexon-solidity-d737f6df42f98c42d98d7bd4bad8a8c96e61d5a1.tar.zst dexon-solidity-d737f6df42f98c42d98d7bd4bad8a8c96e61d5a1.zip |
Latest tests-related refactoring & improvments.
Diffstat (limited to 'trie.cpp')
-rw-r--r-- | trie.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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<pair<string, string>> 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())); } } } |