Skip to content

Commit

Permalink
Updated alloc_size test not to be reliant on evaluation order.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminion committed Jul 11, 2017
1 parent 6278d0c commit 057c165
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/liblll/EndToEndTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,10 @@ BOOST_AUTO_TEST_CASE(alloc_size)
{
char const* sourceCode = R"(
(returnlll
(return (- (msize) (alloc (calldataload 0x04)))))
(seq
(mstore 0x00 0) ; reserve space for the result of the alloc
(mstore 0x00 (alloc (calldataload 0x04)))
(return (- (msize) (mload 0x00)))))
)";
compileAndRun(sourceCode);
BOOST_CHECK(callContractFunction("test()", 0) == encodeArgs(u256(0)));
Expand Down

0 comments on commit 057c165

Please sign in to comment.