Skip to content

Commit 462ab19

Browse files
author
Enrico Steffinlongo
committed
Add array update regression test
1 parent 84da25e commit 462ab19

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
int main()
2+
{
3+
int example_array[10000];
4+
unsigned int index;
5+
__CPROVER_assume(index < 10000);
6+
example_array[index] = 42;
7+
__CPROVER_assert(example_array[index] == 42, "Array condition");
8+
__CPROVER_assert(example_array[index] != 42, "Array condition");
9+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
array_write.c
3+
4+
Passing problem to incremental SMT2 solving
5+
\[main\.assertion\.1\] line \d+ Array condition: SUCCESS
6+
\[main\.assertion\.2\] line \d+ Array condition: FAILURE
7+
^EXIT=10$
8+
^SIGNAL=0$
9+
--
10+
--
11+
Test of updating the value at an index of an array.

0 commit comments

Comments
 (0)