Skip to content

Commit 1e42716

Browse files
committed
Properly fixes test descriptions for contracts regression
Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
1 parent 58cac97 commit 1e42716

File tree

5 files changed

+68
-2
lines changed

5 files changed

+68
-2
lines changed

regression/contracts/function-calls-03-1/test-enf.desc renamed to regression/contracts/function-calls-03-1/test-enf-f1.desc

File renamed without changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
CORE
2+
main.c
3+
--enforce-contract f2 _ --unwind 20 --unwinding-assertions
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^file main.c line \d+ function f2: recursion is ignored on call to \'f2\'$
7+
^\[postcondition.\d+\] file main.c line \d+ Check ensures clause: FAILURE$
8+
^\[f2.\d+\] line \d+ Check that loc is assignable: SUCCESS$
9+
^VERIFICATION FAILED$
10+
--
11+
--
12+
Verification:
13+
function | pre-cond | post-cond
14+
---------|----------|----------
15+
f2 | assumed | asserted
16+
17+
Test should fail:
18+
The postcondition of f2 is incorrect, considering the recursion particularity.
19+
20+
Recursion:
21+
The base case for the recursive call to f2 provides different behavior than the common case (given the pre-conditions).

regression/contracts/function-calls-04-1/test-enf.desc renamed to regression/contracts/function-calls-04-1/test-enf-f1.desc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Verification:
1414
f1 | assumed | asserted
1515

1616
Test should fail:
17-
The postcondition of f2 is incorrect, considering the recursion particularity.
17+
The postcondition of f2_out is incorrect, considering the recursion particularity.
1818

1919
Recursion:
20-
The base case for the recursive call to f2 provides different behavior than the general case (given the pre-conditions).
20+
The base case for the recursive call to f2_out provides different behavior
21+
than the general case (given the pre-conditions).
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CORE
2+
main.c
3+
--enforce-contract f2_in _ --unwind 20 --unwinding-assertions
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^file main.c line \d+ function f2\_out: recursion is ignored on call to \'f2\_in\'$
7+
^\[postcondition.\d+\] file main.c line \d+ Check ensures clause: FAILURE$
8+
^\[f2\_out.\d+\] line \d+ Check that loc2 is assignable: SUCCESS$
9+
^VERIFICATION FAILED$
10+
--
11+
--
12+
Verification:
13+
function | pre-cond | post-cond
14+
---------|----------|----------
15+
f2_in | assumed | asserted
16+
17+
Test should fail:
18+
The postcondition of f2_out is incorrect, considering the recursion particularity.
19+
20+
Recursion:
21+
The base case for the recursive call to f2_out provides different behavior
22+
than the general case (given the pre-conditions).
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CORE
2+
main.c
3+
--enforce-contract f2_out _ --unwind 20 --unwinding-assertions
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^file main.c line \d+ function f2\_in: recursion is ignored on call to \'f2\_out\'$
7+
^\[postcondition.\d+\] file main.c line \d+ Check ensures clause: FAILURE$
8+
^\[f2\_out.\d+\] line \d+ Check that loc2 is assignable: SUCCESS$
9+
^VERIFICATION FAILED$
10+
--
11+
--
12+
Verification:
13+
function | pre-cond | post-cond
14+
---------|----------|----------
15+
f2_out | assumed | asserted
16+
17+
Test should fail:
18+
The postcondition of f2 is incorrect, considering the recursion particularity.
19+
20+
Recursion:
21+
The base case for the recursive call to f2_out provides different behavior
22+
than the general case (given the pre-conditions).

0 commit comments

Comments
 (0)