mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Another test for division.
This commit is contained in:
parent
d160ec8595
commit
00e252a39f
@ -530,6 +530,16 @@ BOOST_AUTO_TEST_CASE(division_truncates_correctly)
|
|||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
CHECK_SUCCESS_NO_WARNINGS(text);
|
CHECK_SUCCESS_NO_WARNINGS(text);
|
||||||
|
text = R"(
|
||||||
|
contract C {
|
||||||
|
function f(int x, int y) public pure {
|
||||||
|
x = 7;
|
||||||
|
y = -2;
|
||||||
|
assert(x / y == -3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
CHECK_SUCCESS_NO_WARNINGS(text);
|
||||||
text = R"(
|
text = R"(
|
||||||
contract C {
|
contract C {
|
||||||
function f(int x, int y) public pure {
|
function f(int x, int y) public pure {
|
||||||
|
Loading…
Reference in New Issue
Block a user