Skip to content

Commit 9678a3d

Browse files
committed
Cleans-up all regression tests for assigns clauses
Signed-off-by: Felipe R. Monteiro <[email protected]>
1 parent cf8e8cb commit 9678a3d

File tree

25 files changed

+47
-41
lines changed

25 files changed

+47
-41
lines changed

regression/contracts/assigns_enforce_01/main.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
#include <assert.h>
2-
3-
int z;
4-
5-
// z is not assigned, but it *may* be assigned.
6-
// The assigns clause does not need to exactly match the
7-
// set of variables which are assigned in the function.
8-
int foo(int *x) __CPROVER_assigns(z, *x)
1+
int foo(int *x) __CPROVER_assigns(*x)
92
__CPROVER_ensures(__CPROVER_return_value == *x + 5)
103
{
114
*x = *x + 0;

regression/contracts/assigns_enforce_02/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <assert.h>
2-
31
int z;
42

53
int foo(int *x) __CPROVER_assigns(z)

regression/contracts/assigns_enforce_03/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <assert.h>
2-
31
void f1(int *x1, int *y1, int *z1) __CPROVER_assigns(*x1, *y1, *z1)
42
{
53
f2(x1, y1, z1);

regression/contracts/assigns_enforce_04/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <assert.h>
2-
31
void f1(int *x1, int *y1, int *z1) __CPROVER_assigns(*x1, *y1, *z1)
42
{
53
f2(x1, y1, z1);

regression/contracts/assigns_enforce_05/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <assert.h>
2-
31
void f1(int *x1, int *y1, int *z1) __CPROVER_assigns(*x1, *y1, *z1)
42
{
53
f2(x1, y1, z1);

regression/contracts/assigns_enforce_06/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <assert.h>
2-
31
void f1(int *x1, int *y1, int *z1) __CPROVER_assigns(*x1, *y1, *z1)
42
{
53
f2(x1, y1, z1);

regression/contracts/assigns_enforce_07/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <assert.h>
2-
31
void f1(int *x1, int *y1, int *z1) __CPROVER_assigns(*x1, *y1, *z1)
42
{
53
f2(x1, y1, z1);

regression/contracts/assigns_enforce_08/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <assert.h>
2-
31
void f1(int *x) __CPROVER_assigns(*x)
42
{
53
int *a = x;

regression/contracts/assigns_enforce_08/test.desc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ main.c
66
^VERIFICATION SUCCESSFUL$
77
--
88
--
9-
This test checks that verification succeeds when a function with an assigns clause calls another with an additional level of indirection, and that functions respects the assigns clause of the caller.
9+
This test checks that verification succeeds when a function with an assigns
10+
clause calls another with an additional level of indirection, and that
11+
functions respects the assigns clause of the caller.

regression/contracts/assigns_enforce_09/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <assert.h>
2-
31
void f1(int **x) __CPROVER_assigns(*x)
42
{
53
f2(x);

0 commit comments

Comments
 (0)