Skip to content

Commit dea6500

Browse files
NlightNFotisthomasspriggs
authored andcommitted
Add regression tests for array read traces
1 parent b257100 commit dea6500

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
int main()
2+
{
3+
int example_array[1025];
4+
unsigned int index;
5+
__CPROVER_assume(index < 1025);
6+
__CPROVER_assert(example_array[index] != 42, "Array condition");
7+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
CORE
2+
array_read.c
3+
--trace
4+
Passing problem to incremental SMT2 solving
5+
\[main\.assertion\.1\] line \d+ Array condition: FAILURE
6+
^Trace for main\.assertion\.1
7+
example_array=\{ (\d+, )*42
8+
^EXIT=10$
9+
^SIGNAL=0$
10+
--
11+
--
12+
Test of reading a value at a non-deterministic index of an array.
13+
Similar to the test in ../arrays/array_read.c, but we want to assert
14+
the value of the array that comes back in the trace to make sure we're
15+
observing the correct values.

0 commit comments

Comments
 (0)