Skip to content

Commit 0c34d9d

Browse files
author
Leo Alt
committed
Adjust tests for nondeterminism
1 parent ff5c842 commit 0c34d9d

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

test/libsolidity/smtCheckerTests/array_members/push_storage_ref_unsafe_aliasing.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ contract C {
1313
// ====
1414
// SMTEngine: all
1515
// SMTIgnoreOS: macos
16+
// SMTIgnoreCex: yes
1617
// ----
17-
// Warning 6368: (188-192): CHC: Out of bounds access happens here.\nCounterexample:\na = []\nb = [32]\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.f()
18-
// Warning 6368: (188-195): CHC: Out of bounds access happens here.\nCounterexample:\n\nb = [32]\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.f()
19-
// Warning 6328: (181-202): CHC: Assertion violation happens here.\nCounterexample:\n\nb = [32]\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.f()
18+
// Warning 6368: (188-192): CHC: Out of bounds access happens here.
19+
// Warning 6368: (188-195): CHC: Out of bounds access happens here.
20+
// Warning 6328: (181-202): CHC: Assertion violation happens here.

test/libsolidity/smtCheckerTests/external_calls/call_safe.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ contract C {
77
}
88
// ====
99
// SMTEngine: all
10+
// SMTIgnoreInv: yes
1011
// ----
1112
// Warning 2072: (57-63): Unused local variable.
1213
// Warning 2072: (65-82): Unused local variable.
13-
// Info 1180: Contract invariant(s) for :C:\n(x <= 0)\nReentrancy property(ies) for :C:\n((!(x <= 0) || (<errorCode> <= 0)) && (!(x <= 0) || (x' <= 0)))\n<errorCode> = 0 -> no errors\n<errorCode> = 1 -> Assertion failed at assert(x == 0)\n

test/libsolidity/smtCheckerTests/external_calls/external_single_inc.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ contract C {
2222
}
2323
// ====
2424
// SMTEngine: all
25+
// SMTIgnoreCex: yes
2526
// ----
26-
// Warning 6328: (223-240): CHC: Assertion violation happens here.\nCounterexample:\nx = 1, y = 1, d = 0\noldX = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0, y = 0, d = 0\nC.inc()\nState: x = 0, y = 1, d = 0\nC.f()\n d.d() -- untrusted external call, synthesized as:\n C.inc() -- reentrant call
27+
// Warning 6328: (223-240): CHC: Assertion violation happens here.

test/libsolidity/smtCheckerTests/functions/functions_external_1.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ contract C
1717
// ====
1818
// SMTEngine: all
1919
// SMTIgnoreOS: macos
20-
// ----
21-
// Info 1180: Contract invariant(s) for :C:\n(x <= 0)\nReentrancy property(ies) for :C:\n!(<errorCode> = 1)\n((!(<errorCode> >= 2) || !(x <= 0)) && (!(x <= 0) || (x' <= 0)))\n<errorCode> = 0 -> no errors\n<errorCode> = 1 -> Assertion failed at assert(x == y)\n<errorCode> = 2 -> Assertion failed at assert(x == y)\n
20+
// SMTIgnoreInv: yes

test/libsolidity/smtCheckerTests/try_catch/try_4.sol

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ contract C {
1414
function f() public {
1515
x = 0;
1616
try d.d() {
17-
assert(x == 0); // should fail, x can be anything here
17+
//assert(x == 0); // should fail, x can be anything here
1818
} catch {
1919
assert(x == 0); // should hold, all changes to x has been reverted
2020
assert(x == 1); // should fail
@@ -25,8 +25,5 @@ contract C {
2525
// SMTEngine: all
2626
// SMTIgnoreCex: yes
2727
// ----
28-
// Warning 1218: (178-192): CHC: Error trying to invoke SMT solver.
29-
// Warning 6328: (178-192): CHC: Assertion violation might happen here.
30-
// Warning 6328: (318-332): CHC: Assertion violation happens here.
31-
// Info 1180: Reentrancy property(ies) for :C:\n!(<errorCode> = 2)\n<errorCode> = 0 -> no errors\n<errorCode> = 1 -> Assertion failed at assert(x == 0)\n<errorCode> = 2 -> Assertion failed at assert(x == 0)\n<errorCode> = 3 -> Assertion failed at assert(x == 1)\n
32-
// Warning 4661: (178-192): BMC: Assertion violation happens here.
28+
// Warning 6328: (320-334): CHC: Assertion violation happens here.
29+
// Info 1180: Reentrancy property(ies) for :C:\n!(<errorCode> = 1)\n<errorCode> = 0 -> no errors\n<errorCode> = 1 -> Assertion failed at assert(x == 0)\n<errorCode> = 2 -> Assertion failed at assert(x == 1)\n

0 commit comments

Comments
 (0)