diff options
author | Gav Wood <i@gavwood.com> | 2014-06-29 01:23:32 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2014-06-29 01:23:32 +0800 |
commit | d8e04c43b18a9b20e9a215e7795424e305932e09 (patch) | |
tree | bc82b1e28a908119df12789e32f56530849d02b2 /trie.cpp | |
parent | b62f71c699de687268b5d83a526f66027fca07ea (diff) | |
download | dexon-solidity-d8e04c43b18a9b20e9a215e7795424e305932e09.tar.gz dexon-solidity-d8e04c43b18a9b20e9a215e7795424e305932e09.tar.zst dexon-solidity-d8e04c43b18a9b20e9a215e7795424e305932e09.zip |
Full python serpent support.
Shared libs on all platforms.
Diffstat (limited to 'trie.cpp')
-rw-r--r-- | trie.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -55,13 +55,18 @@ BOOST_AUTO_TEST_CASE(trie_tests) js::read_string(s, v); for (auto& i: v.get_obj()) { + cnote << i.first; js::mObject& o = i.second.get_obj(); -// cnote << i.first; vector<pair<string, string>> ss; - for (auto& i: o["in"].get_obj()) + 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) + if (!ss.back().first.find("0x")) + ss.back().first = asString(fromHex(ss.back().first.substr(2))); + if (!ss.back().second.find("0x")) + ss.back().second = asString(fromHex(ss.back().second.substr(2))); + } + for (unsigned j = 0; j < min(1000u, eth::test::fac((unsigned)ss.size())); ++j) { next_permutation(ss.begin(), ss.end()); MemoryDB m; @@ -70,7 +75,6 @@ BOOST_AUTO_TEST_CASE(trie_tests) BOOST_REQUIRE(t.check(true)); for (auto const& k: ss) { -// cdebug << k.first << k.second; t.insert(k.first, k.second); BOOST_REQUIRE(t.check(true)); } |