source:
CIVL/examples/mem/mem_tests/mem_havoc_array2d.cvl@
aaa9c8d
| Last change on this file since aaa9c8d was da65ee2, checked in by , 7 years ago | |
|---|---|
|
|
| File size: 262 bytes | |
| Line | |
|---|---|
| 1 | #include<mem.cvh> |
| 2 | |
| 3 | int main() { |
| 4 | int a[3][3] = {{0,1,2}, {3,4,5}, {6,7,8}}; |
| 5 | $mem m = &a[1 .. 2][0 .. 1]; |
| 6 | |
| 7 | $mem_havoc(m); |
| 8 | |
| 9 | $assert(a[0][0] == 0); |
| 10 | $assert(a[0][1] == 1); |
| 11 | $assert(a[0][2] == 2); |
| 12 | $assert(a[1][2] == 5); |
| 13 | $assert(a[2][2] == 8); |
| 14 | } |
Note:
See TracBrowser
for help on using the repository browser.
