diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-02 05:37:46 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-11-22 21:33:24 +0800 |
commit | 636da48e82f64224a8611dabad1b8a1a019fcfd4 (patch) | |
tree | 2fbb7d054675ef81fe7dd91c80b5bf7668235993 /test/libsolidity/smtCheckerTests/037_while_loop_simple.sol | |
parent | a5411965e6d7abf50f896291d69cab820db6ef87 (diff) | |
download | dexon-solidity-636da48e82f64224a8611dabad1b8a1a019fcfd4.tar dexon-solidity-636da48e82f64224a8611dabad1b8a1a019fcfd4.tar.gz dexon-solidity-636da48e82f64224a8611dabad1b8a1a019fcfd4.tar.bz2 dexon-solidity-636da48e82f64224a8611dabad1b8a1a019fcfd4.tar.lz dexon-solidity-636da48e82f64224a8611dabad1b8a1a019fcfd4.tar.xz dexon-solidity-636da48e82f64224a8611dabad1b8a1a019fcfd4.tar.zst dexon-solidity-636da48e82f64224a8611dabad1b8a1a019fcfd4.zip |
Move most of SMTChecker tests from C++ to isoltest
But keep divison in C++ because results differ between different solvers
Diffstat (limited to 'test/libsolidity/smtCheckerTests/037_while_loop_simple.sol')
-rw-r--r-- | test/libsolidity/smtCheckerTests/037_while_loop_simple.sol | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/smtCheckerTests/037_while_loop_simple.sol b/test/libsolidity/smtCheckerTests/037_while_loop_simple.sol new file mode 100644 index 00000000..41559c99 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/037_while_loop_simple.sol @@ -0,0 +1,12 @@ +pragma experimental SMTChecker; +// Check that side-effects of condition are taken into account +contract C { + function f(uint x, uint y) public pure { + x = 7; + while ((x = y) > 0) { + } + assert(x == 7); + } +} +// ---- +// Warning: (216-230): Assertion violation happens here\nNote that some information is erased after the execution of loops.\nYou can re-introduce information using require(). |