diff options
author | chriseth <chris@ethereum.org> | 2017-10-06 01:31:28 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-11-30 08:20:21 +0800 |
commit | 00e252a39faf99802ab46f32b41950c6f825063a (patch) | |
tree | 0c552be93247f61bc57c8e3b099a397e96b416c8 | |
parent | d160ec8595171e16dd404e9b859aa37aed2fe0a4 (diff) | |
download | dexon-solidity-00e252a39faf99802ab46f32b41950c6f825063a.tar dexon-solidity-00e252a39faf99802ab46f32b41950c6f825063a.tar.gz dexon-solidity-00e252a39faf99802ab46f32b41950c6f825063a.tar.bz2 dexon-solidity-00e252a39faf99802ab46f32b41950c6f825063a.tar.lz dexon-solidity-00e252a39faf99802ab46f32b41950c6f825063a.tar.xz dexon-solidity-00e252a39faf99802ab46f32b41950c6f825063a.tar.zst dexon-solidity-00e252a39faf99802ab46f32b41950c6f825063a.zip |
Another test for division.
-rw-r--r-- | test/libsolidity/SMTChecker.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/SMTChecker.cpp b/test/libsolidity/SMTChecker.cpp index 7aa555e9..eac78835 100644 --- a/test/libsolidity/SMTChecker.cpp +++ b/test/libsolidity/SMTChecker.cpp @@ -533,6 +533,16 @@ BOOST_AUTO_TEST_CASE(division_truncates_correctly) 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"( + contract C { + function f(int x, int y) public pure { x = -7; y = -2; int r = x / y; |