mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
parent
46381f9e91
commit
e0fbdd57e6
@ -1883,6 +1883,22 @@ BOOST_AUTO_TEST_CASE(positive_integers_to_unsigned_out_of_bound)
|
|||||||
BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError);
|
BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(integer_boolean_operators)
|
||||||
|
{
|
||||||
|
char const* sourceCode1 = R"(
|
||||||
|
contract test { function() { uint x = 1; uint y = 2; x || y; } }
|
||||||
|
)";
|
||||||
|
BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode1), TypeError);
|
||||||
|
char const* sourceCode2 = R"(
|
||||||
|
contract test { function() { uint x = 1; uint y = 2; x && y; } }
|
||||||
|
)";
|
||||||
|
BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode2), TypeError);
|
||||||
|
char const* sourceCode3 = R"(
|
||||||
|
contract test { function() { uint x = 1; !x; } }
|
||||||
|
)";
|
||||||
|
BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode3), TypeError);
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(overwrite_memory_location_external)
|
BOOST_AUTO_TEST_CASE(overwrite_memory_location_external)
|
||||||
{
|
{
|
||||||
char const* sourceCode = R"(
|
char const* sourceCode = R"(
|
||||||
|
Loading…
Reference in New Issue
Block a user