Skip to content

Commit 677f579

Browse files
author
Remi Delmas
committed
CONTRACTS: deduplicate tests
1 parent d288ba0 commit 677f579

File tree

15 files changed

+13
-166
lines changed

15 files changed

+13
-166
lines changed

regression/contracts-dfcc/invar_function-old_fail/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE dfcc-only
1+
CORE
22
main.c
33
--dfcc main --apply-loop-contracts
44
^main.c.* error: __CPROVER_old is not allowed in loop invariants.$
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE dfcc-only
1+
CORE
22
main.c
33
--dfcc main --apply-loop-contracts
44
^Decreases clause is not side-effect free. \(at: file main.c line .* function main\)$
@@ -8,7 +8,7 @@ main.c
88
--
99
This test fails because the decreases clause contains a function call. Decreases
1010
clauses must not contain loops, since we want to ensure that the
11-
calculation of decreases clauses will terminate. To enforce this requirement,
12-
for now, we simply ban decreases clauses from containing function calls.
11+
calculation of decreases clauses will terminate. To enforce this requirement,
12+
for now, we simply ban decreases clauses from containing function calls.
1313
In the future, we may allow function calls (but definitely not loops) to appear
14-
inside decreases clauses.
14+
inside decreases clauses.

regression/contracts-dfcc/variant_parsing_multiple_clauses_fail/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE dfcc-only
1+
CORE
22
main.c
33
--dfcc main --apply-loop-contracts
44
activate-multi-line-match
@@ -12,5 +12,5 @@ This test fails because we have multiple decreases clauses. CBMC only admits
1212
one decreases clause for each loop. If one wants to write a multidimensional
1313
decreases clause, it should be placed inside a single __CPROVER_decreases(...),
1414
where each component of the multidimensional decreases clause is separated by a
15-
comma. Hence, in this test, the correct syntax is
15+
comma. Hence, in this test, the correct syntax is
1616
__CPROVER_decreases(N - i, 42).
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE dfcc-only
1+
CORE
22
main.c
33
--dfcc main --apply-loop-contracts
44
activate-multi-line-match
@@ -8,6 +8,6 @@ activate-multi-line-match
88
^SIGNAL=0$
99
--
1010
--
11-
This test fails because the decreases clause is a statement (more precisely,
11+
This test fails because the decreases clause is a statement (more precisely,
1212
an assignment) rather than an expression (more precisely, an ACSL binding
1313
expression).
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE dfcc-only
1+
CORE
22
main.c
33
--dfcc main --apply-loop-contracts
44
^Decreases clause is not side-effect free. \(at: file main.c line .* function main\)$
@@ -8,6 +8,6 @@ main.c
88
--
99
This test fails because the decreases clause contains a side effect, namely
1010
incrementing variable N by zero. In this case, although the value of N
11-
remains unchanged after the increment operation, we read from and write to N.
12-
So this constitues a side effect. Decreases clauses are banned from containing
13-
side effects, since decreases clauses should not modify program states.
11+
remains unchanged after the increment operation, we read from and write to N.
12+
So this constitues a side effect. Decreases clauses are banned from containing
13+
side effects, since decreases clauses should not modify program states.

regression/contracts/invar_function-old_fail/main.c

Lines changed: 0 additions & 17 deletions
This file was deleted.

regression/contracts/invar_function-old_fail/test.desc

Lines changed: 0 additions & 10 deletions
This file was deleted.

regression/contracts/variant_function_call_fail/main.c

Lines changed: 0 additions & 23 deletions
This file was deleted.

regression/contracts/variant_function_call_fail/test.desc

Lines changed: 0 additions & 14 deletions
This file was deleted.

regression/contracts/variant_parsing_multiple_clauses_fail/main.c

Lines changed: 0 additions & 16 deletions
This file was deleted.

regression/contracts/variant_parsing_multiple_clauses_fail/test.desc

Lines changed: 0 additions & 16 deletions
This file was deleted.

regression/contracts/variant_parsing_statement_fail/main.c

Lines changed: 0 additions & 16 deletions
This file was deleted.

regression/contracts/variant_parsing_statement_fail/test.desc

Lines changed: 0 additions & 13 deletions
This file was deleted.

regression/contracts/variant_side_effects_fail/main.c

Lines changed: 0 additions & 15 deletions
This file was deleted.

regression/contracts/variant_side_effects_fail/test.desc

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)