mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
test: add an assertion about storing an invalid boolean into the memory
This commit is contained in:
parent
7cbf6a86dd
commit
fdc9ef14ad
@ -3715,11 +3715,19 @@ BOOST_AUTO_TEST_CASE(storing_invalid_boolean)
|
||||
perm = tmp;
|
||||
return 1;
|
||||
}
|
||||
function ret() returns(bool) {
|
||||
bool tmp;
|
||||
assembly {
|
||||
tmp := 5
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
}
|
||||
)";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(callContractFunction("set()") == encodeArgs(1));
|
||||
BOOST_CHECK(callContractFunction("perm()") == encodeArgs(1));
|
||||
BOOST_CHECK(callContractFunction("ret()") == encodeArgs(1));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user