mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
LLL: add test which has a sub assembly without a forced STOP
This commit is contained in:
parent
d2e65a3ac4
commit
a4d2e17a04
@ -986,6 +986,20 @@ BOOST_AUTO_TEST_CASE(shift_right)
|
|||||||
BOOST_CHECK(callFallback() == encodeArgs(u256(256)));
|
BOOST_CHECK(callFallback() == encodeArgs(u256(256)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(sub_assemblies)
|
||||||
|
{
|
||||||
|
char const* sourceCode = R"(
|
||||||
|
(returnlll
|
||||||
|
(return (create 0 (returnlll (sstore 1 1)))))
|
||||||
|
)";
|
||||||
|
compileAndRun(sourceCode);
|
||||||
|
bytes ret = callFallback();
|
||||||
|
BOOST_REQUIRE(ret.size() == 32);
|
||||||
|
u256 rVal = u256(toHex(ret, 2, HexPrefix::Add));
|
||||||
|
BOOST_CHECK(rVal != 0);
|
||||||
|
BOOST_CHECK(rVal < u256("0x10000000000000000000000000000000000000000"));
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user