mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixed assigning negative number to unsigned
This commit is contained in:
parent
0e664b05aa
commit
1f3e93785e
@ -1866,6 +1866,16 @@ BOOST_AUTO_TEST_CASE(negative_integers_to_unsigned)
|
||||
BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(positive_integers_to_unsigned_out_of_bound)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract test {
|
||||
uint8 public x = 700;
|
||||
}
|
||||
)";
|
||||
BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user