mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Extract SMTChecker mod test
This commit is contained in:
parent
02343208ad
commit
77b9416d3e
@ -59,22 +59,6 @@ protected:
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(SMTChecker, SMTCheckerFramework)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(mod)
|
||||
{
|
||||
string text = R"(
|
||||
contract C {
|
||||
function f(int x, int y) public pure {
|
||||
require(y == -10);
|
||||
require(x == 100);
|
||||
int z1 = x % y;
|
||||
int z2 = x % -y;
|
||||
assert(z1 == z2);
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_SUCCESS_NO_WARNINGS(text);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(import_base)
|
||||
{
|
||||
CompilerStack c;
|
||||
|
10
test/libsolidity/smtCheckerTests/operators/mod.sol
Normal file
10
test/libsolidity/smtCheckerTests/operators/mod.sol
Normal file
@ -0,0 +1,10 @@
|
||||
pragma experimental SMTChecker;
|
||||
contract C {
|
||||
function f(int x, int y) public pure {
|
||||
require(y == -10);
|
||||
require(x == 100);
|
||||
int z1 = x % y;
|
||||
int z2 = x % -y;
|
||||
assert(z1 == z2);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user