mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Full python serpent support.
Shared libs on all platforms.
This commit is contained in:
parent
b62f71c699
commit
d8e04c43b1
@ -8,6 +8,8 @@ link_directories(../libethereum)
|
|||||||
|
|
||||||
add_executable(testeth ${SRC_LIST})
|
add_executable(testeth ${SRC_LIST})
|
||||||
|
|
||||||
|
FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS unit_test_framework)
|
||||||
|
|
||||||
if (${TARGET_PLATFORM} STREQUAL "w64")
|
if (${TARGET_PLATFORM} STREQUAL "w64")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
|
||||||
target_link_libraries(testeth gcc)
|
target_link_libraries(testeth gcc)
|
||||||
|
14
trie.cpp
14
trie.cpp
@ -55,13 +55,18 @@ BOOST_AUTO_TEST_CASE(trie_tests)
|
|||||||
js::read_string(s, v);
|
js::read_string(s, v);
|
||||||
for (auto& i: v.get_obj())
|
for (auto& i: v.get_obj())
|
||||||
{
|
{
|
||||||
|
cnote << i.first;
|
||||||
js::mObject& o = i.second.get_obj();
|
js::mObject& o = i.second.get_obj();
|
||||||
// cnote << i.first;
|
|
||||||
vector<pair<string, string>> ss;
|
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()));
|
ss.push_back(make_pair(i.first, i.second.get_str()));
|
||||||
cnote << ss;
|
if (!ss.back().first.find("0x"))
|
||||||
for (unsigned j = 0; j < eth::test::fac((unsigned)ss.size()); ++j)
|
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());
|
next_permutation(ss.begin(), ss.end());
|
||||||
MemoryDB m;
|
MemoryDB m;
|
||||||
@ -70,7 +75,6 @@ BOOST_AUTO_TEST_CASE(trie_tests)
|
|||||||
BOOST_REQUIRE(t.check(true));
|
BOOST_REQUIRE(t.check(true));
|
||||||
for (auto const& k: ss)
|
for (auto const& k: ss)
|
||||||
{
|
{
|
||||||
// cdebug << k.first << k.second;
|
|
||||||
t.insert(k.first, k.second);
|
t.insert(k.first, k.second);
|
||||||
BOOST_REQUIRE(t.check(true));
|
BOOST_REQUIRE(t.check(true));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user