Browse Source

Compile fixes.

Version bump.
cl-refactor
Gav Wood 10 years ago
parent
commit
cbf22e3ce6
  1. 2
      libethcore/CommonEth.cpp
  2. 12
      test/solidityEndToEndTest.cpp

2
libethcore/CommonEth.cpp

@ -34,7 +34,7 @@ namespace dev
namespace eth
{
const unsigned c_protocolVersion = 41;
const unsigned c_protocolVersion = 42;
const unsigned c_databaseVersion = 4;
static const vector<pair<u256, string>> g_units =

12
test/solidityEndToEndTest.cpp

@ -192,11 +192,11 @@ BOOST_AUTO_TEST_CASE(multiple_functions)
" function f() returns(uint n) { return 3; }\n"
"}\n";
compileAndRun(sourceCode);
BOOST_CHECK(callFunction(0, bytes()) == toBigEndian(u256(0)));
BOOST_CHECK(callFunction(1, bytes()) == toBigEndian(u256(1)));
BOOST_CHECK(callFunction(2, bytes()) == toBigEndian(u256(2)));
BOOST_CHECK(callFunction(3, bytes()) == toBigEndian(u256(3)));
BOOST_CHECK(callFunction(4, bytes()) == bytes());
BOOST_CHECK(callContractFunction(0, bytes()) == toBigEndian(u256(0)));
BOOST_CHECK(callContractFunction(1, bytes()) == toBigEndian(u256(1)));
BOOST_CHECK(callContractFunction(2, bytes()) == toBigEndian(u256(2)));
BOOST_CHECK(callContractFunction(3, bytes()) == toBigEndian(u256(3)));
BOOST_CHECK(callContractFunction(4, bytes()) == bytes());
}
BOOST_AUTO_TEST_CASE(while_loop)
@ -232,7 +232,7 @@ BOOST_AUTO_TEST_CASE(break_outside_loop)
" }\n"
"}\n";
compileAndRun(sourceCode);
testSolidityAgainstCpp(0, [](u256 const& _a) -> u256 { return 2; }, u256(0));
testSolidityAgainstCpp(0, [](u256 const&) -> u256 { return 2; }, u256(0));
}
BOOST_AUTO_TEST_CASE(nested_loops)

Loading…
Cancel
Save