Add end-to-end test

This commit is contained in:
Alex Beregszaszi 2017-07-03 11:01:07 +01:00
parent b65601bb3d
commit ee3a2c0599
2 changed files with 19 additions and 1 deletions

View File

@ -133,7 +133,7 @@ BOOST_AUTO_TEST_CASE(vardecl_bool)
BOOST_AUTO_TEST_CASE(vardecl_empty)
{
BOOST_CHECK(successParse("{ let x }"));
BOOST_CHECK(successParse("{ let x:u256 }"));
}
BOOST_AUTO_TEST_CASE(assignment)

View File

@ -9723,6 +9723,24 @@ BOOST_AUTO_TEST_CASE(multi_modifiers)
BOOST_CHECK(callContractFunction("x()") == encodeArgs(u256(12)));
}
BOOST_AUTO_TEST_CASE(inlineasm_empty_let)
{
char const* sourceCode = R"(
contract C {
function f() returns (uint a, uint b) {
assembly {
let x
let y, z
a := x
b := z
}
}
}
)";
compileAndRun(sourceCode, 0, "C");
BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(0), u256(0)));
}
BOOST_AUTO_TEST_SUITE_END()
}