Skip to content

Commit c120e32

Browse files
Add tests for shadow memory output in trace
Shadow memory assignments appear in trace.
1 parent 5bc32d7 commit c120e32

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <assert.h>
2+
3+
int main()
4+
{
5+
__CPROVER_field_decl_local("field1", (_Bool)0);
6+
7+
int x;
8+
9+
// create a non-trivial counterexample trace
10+
for(int i = 0; i < 4; ++i)
11+
{
12+
if(i == 2)
13+
{
14+
__CPROVER_set_field(&x, "field1", 1);
15+
}
16+
}
17+
18+
assert(__CPROVER_get_field(&x, "field1") == 0);
19+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FUTURE
2+
main.c
3+
--stop-on-fail --unwind 5
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED
7+
SM__&x!0@1__field1=
8+
--
9+
^warning: ignoring

0 commit comments

Comments
 (0)