diff options
| author | Leonardo Alt <leo@ethereum.org> | 2018-10-18 21:03:52 +0800 |
|---|---|---|
| committer | Leonardo Alt <leo@ethereum.org> | 2018-10-19 21:52:16 +0800 |
| commit | b46b827c30584968c6815b456b8c0c775c35ae48 (patch) | |
| tree | 7ea55c6c685cc81779d5dd7bc3f44da22918840e /test/libsolidity/smtCheckerTests/special/many.sol | |
| parent | c13b5280c1b44f18a2a1fb61ef5556e91c5678e7 (diff) | |
| download | dexon-solidity-b46b827c30584968c6815b456b8c0c775c35ae48.tar dexon-solidity-b46b827c30584968c6815b456b8c0c775c35ae48.tar.gz dexon-solidity-b46b827c30584968c6815b456b8c0c775c35ae48.tar.bz2 dexon-solidity-b46b827c30584968c6815b456b8c0c775c35ae48.tar.lz dexon-solidity-b46b827c30584968c6815b456b8c0c775c35ae48.tar.xz dexon-solidity-b46b827c30584968c6815b456b8c0c775c35ae48.tar.zst dexon-solidity-b46b827c30584968c6815b456b8c0c775c35ae48.zip | |
[SMTChecker] Support msg.*, tx.*, block.*, gasleft and blockhash
Diffstat (limited to 'test/libsolidity/smtCheckerTests/special/many.sol')
| -rw-r--r-- | test/libsolidity/smtCheckerTests/special/many.sol | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/libsolidity/smtCheckerTests/special/many.sol b/test/libsolidity/smtCheckerTests/special/many.sol new file mode 100644 index 00000000..40e5d987 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/special/many.sol @@ -0,0 +1,25 @@ +pragma experimental SMTChecker; + +contract C +{ + function f() public payable { + assert(msg.sender == block.coinbase); + assert(block.difficulty == block.gaslimit); + assert(block.number == block.timestamp); + assert(tx.gasprice == msg.value); + assert(tx.origin == msg.sender); + uint x = block.number; + assert(x + 2 > block.number); + assert(now > 10); + assert(gasleft() > 100); + } +} +// ---- +// Warning: (79-115): Assertion violation happens here +// Warning: (119-161): Assertion violation happens here +// Warning: (165-204): Assertion violation happens here +// Warning: (208-240): Assertion violation happens here +// Warning: (244-275): Assertion violation happens here +// Warning: (311-316): Overflow (resulting value larger than 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) happens here +// Warning: (336-352): Assertion violation happens here +// Warning: (356-379): Assertion violation happens here |
