From 00e252a39faf99802ab46f32b41950c6f825063a Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 5 Oct 2017 19:31:28 +0200 Subject: Another test for division. --- test/libsolidity/SMTChecker.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') 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 @@ -530,6 +530,16 @@ BOOST_AUTO_TEST_CASE(division_truncates_correctly) } )"; 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"( contract C { function f(int x, int y) public pure { -- cgit v1.2.3