mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
updates to the tests
This commit is contained in:
parent
bb0003f5ea
commit
41d31fe4d4
@ -34,4 +34,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6328: (528-565): CHC: Assertion violation happens here.\nCounterexample:\nowner = 1, y = 0, z = 0, s = 0\n\n\n\nTransaction trace:\nconstructor()\nState: owner = 1, y = 0, z = 0, s = 0\nf()
|
||||
// Warning 6328: (528-565): CHC: Assertion violation happens here.\nCounterexample:\nowner = (- 1), y = 0, z = 0, s = 0\n\n\n\nTransaction trace:\nconstructor()\nState: owner = (- 1), y = 0, z = 0, s = 0\nf()
|
||||
|
@ -15,12 +15,19 @@ contract C {
|
||||
kec = keccak256(data);
|
||||
}
|
||||
|
||||
function f() public view {
|
||||
function check(bytes memory _data) public view {
|
||||
bytes32 _kec = keccak256(data);
|
||||
assert(_kec == kec);
|
||||
assert(_kec == kec); // should hold
|
||||
assert(kec == keccak256(_data)); // should fail
|
||||
}
|
||||
|
||||
function ext(D d) public {
|
||||
d.d();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (335-366): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 6328: (335-366): CHC: Assertion violation might happen here.
|
||||
// Warning 1218: (335-366): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 6328: (335-366): CHC: Assertion violation might happen here.
|
||||
// Warning 4661: (335-366): BMC: Assertion violation happens here.
|
||||
|
@ -12,6 +12,8 @@ contract C {
|
||||
assert(y == x);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// SMTIgnoreCex: yes
|
||||
// ----
|
||||
// Warning 6328: (162-176): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\ny = 1\n\n\nTransaction trace:\nconstructor(0, 0)\nState: x = 0\nf(1)
|
||||
// Warning 4984: (115-120): CHC: Overflow (resulting value larger than 2**256 - 1) happens here.\nCounterexample:\nx = 5\na = 1\nb = 115792089237316195423570985008687907853269984665640564039457584007913129639935\n\n\nTransaction trace:\nconstructor(1, 115792089237316195423570985008687907853269984665640564039457584007913129639935)
|
||||
// Warning 6328: (162-176): CHC: Assertion violation happens here.
|
||||
// Warning 4984: (115-120): CHC: Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
|
@ -17,4 +17,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6328: (293-307): CHC: Assertion violation happens here.\nCounterexample:\n\n\n\n\nTransaction trace:\nconstructor()\nf()
|
||||
// Warning 6328: (293-307): CHC: Assertion violation happens here.
|
||||
|
@ -20,4 +20,5 @@ contract LoopFor2 {
|
||||
}
|
||||
// ----
|
||||
// Warning 4984: (236-241): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
|
||||
// Warning 4984: (216-222): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
|
||||
// Warning 6328: (363-382): CHC: Assertion violation happens here.\nCounterexample:\nb = [], c = []\nn = 1\n\n\nTransaction trace:\nconstructor()\nState: b = [], c = []\ntestUnboundedForLoop(1)
|
||||
|
@ -3,7 +3,7 @@ pragma experimental SMTChecker;
|
||||
contract C
|
||||
{
|
||||
function f(bool b, uint[] memory c) public pure {
|
||||
require(c.length <= 2);
|
||||
require(c.length >= 1 && c.length <= 2);
|
||||
c[0] = 0;
|
||||
if (b)
|
||||
c[0] = 1;
|
||||
@ -11,4 +11,4 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6328: (159-175): CHC: Assertion violation happens here.\nCounterexample:\n\nb = false\nc = [0, 5]\n\n\nTransaction trace:\nconstructor()\nf(false, [7719, 5])
|
||||
// Warning 6328: (176-192): CHC: Assertion violation happens here.\nCounterexample:\n\nb = false\nc = [0, 14]\n\n\nTransaction trace:\nconstructor()\nf(false, [38, 14])
|
||||
|
@ -24,4 +24,4 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6328: (421-452): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 8855\n\n\nTransaction trace:\nconstructor()\ng(8855)
|
||||
// Warning 6328: (421-452): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 38\n\n\nTransaction trace:\nconstructor()\ng(38)
|
||||
|
@ -24,4 +24,4 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6328: (425-456): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 8855\n\n\nTransaction trace:\nconstructor()\ng(8855)
|
||||
// Warning 6328: (425-456): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 38\n\n\nTransaction trace:\nconstructor()\ng(38)
|
||||
|
Loading…
Reference in New Issue
Block a user