Skip to content

Commit e26e7d3

Browse files
committed
Test trace-values: create reads to enforce instantiation
The test specification expects that the indices 0, 1, and one other are instantiated. The array theory is only required to do so when also reading from these elements.
1 parent 9aa4113 commit e26e7d3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

regression/cbmc/trace-values/unbounded_array.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ int main(int argc, char *argv[])
99
array[size - 1] = 42;
1010
int fixed_array[] = {1, 2};
1111
__CPROVER_array_replace(array, fixed_array);
12+
assert(array[0] == 1);
13+
assert(array[1] == 2);
14+
assert(array[size - 1] == 42);
1215
assert(array[0] == 0);
1316
}

0 commit comments

Comments
 (0)