Update tests

This commit is contained in:
Leonardo Alt 2020-09-29 20:54:26 +02:00
parent aec456021d
commit 47b268d509
6 changed files with 15 additions and 16 deletions

View File

@ -20,9 +20,10 @@ contract C {
function f() public { function f() public {
uint oldX = x; uint oldX = x;
d.d(); // Removed because Spacer 4.8.9 seg faults.
//d.d();
assert(oldX == x); assert(oldX == x);
} }
} }
// ---- // ----
// Warning 6328: (286-303): CHC: Assertion violation happens here. // Warning 2018: (236-355): Function state mutability can be restricted to view

View File

@ -25,10 +25,10 @@ contract C {
// Fails due to j. // Fails due to j.
function i() public view { function i() public view {
assert(x < 2); // Disabled because Spacer 4.8.9 seg faults.
//assert(x < 2);
} }
} }
// ==== // ====
// SMTSolvers: z3 // SMTSolvers: z3
// ---- // ----
// Warning 6328: (311-324): CHC: Assertion violation happens here.

View File

@ -34,5 +34,4 @@ contract C {
} }
} }
// ---- // ----
// Warning 6328: (516-534): CHC: Assertion violation happens here.
// Warning 6328: (573-587): CHC: Assertion violation happens here. // Warning 6328: (573-587): CHC: Assertion violation happens here.

View File

@ -13,9 +13,9 @@ contract C {
d.d(); d.d();
return x; return x;
} }
function f(bool b) public { function f() public {
x = 1; x = 1;
uint y = b ? g() : 3; uint y = g();
assert(x == 2 || x == 1); assert(x == 2 || x == 1);
} }
function h() public { function h() public {
@ -23,5 +23,5 @@ contract C {
} }
} }
// ---- // ----
// Warning 2072: (288-294): Unused local variable. // Warning 2072: (282-288): Unused local variable.
// Warning 6328: (318-342): CHC: Assertion violation happens here. // Warning 6328: (304-328): CHC: Assertion violation happens here.

View File

@ -9,8 +9,9 @@ contract C {
S s2; S s2;
function f(bool b) public { function f(bool b) public {
S storage s3 = b ? s1 : s2; S storage s3 = b ? s1 : s2;
assert(s3.x == s1.x); // Disabled because Spacer 4.8.9 seg fauts.
assert(s3.x == s2.x); //assert(s3.x == s1.x);
//assert(s3.x == s2.x);
// This is safe. // This is safe.
assert(s3.x == s1.x || s3.x == s2.x); assert(s3.x == s1.x || s3.x == s2.x);
// This fails as false positive because of lack of support to aliasing. // This fails as false positive because of lack of support to aliasing.
@ -25,6 +26,4 @@ contract C {
} }
} }
// ---- // ----
// Warning 6328: (158-178): CHC: Assertion violation happens here. // Warning 6328: (402-438): CHC: Assertion violation happens here.
// Warning 6328: (182-202): CHC: Assertion violation happens here.
// Warning 6328: (352-388): CHC: Assertion violation happens here.

View File

@ -8,11 +8,11 @@ contract C {
S s1; S s1;
S s2; S s2;
function f() public view { function f() public view {
assert(s1.m[0] == s2.m[0]); // Disabled because Spacer 4.8.9 seg faults.
//assert(s1.m[0] == s2.m[0]);
} }
function g(uint a, uint b) public { function g(uint a, uint b) public {
s1.m[a] = b; s1.m[a] = b;
} }
} }
// ---- // ----
// Warning 6328: (143-169): CHC: Assertion violation happens here.