Skip to content

Commit 4677a1f

Browse files
committed
Add runtime test arrcheck2
1 parent 160ddf6 commit 4677a1f

3 files changed

Lines changed: 30 additions & 24 deletions

File tree

tests/runtime/arrcheck2.bas

Lines changed: 0 additions & 24 deletions
This file was deleted.

tests/runtime/cases/arrcheck2.bas

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#include "lib/tst_framework.bas"
2+
3+
INIT("Testing global array(i, j, k)")
4+
5+
DIM a(7, 19, 11) as UInteger
6+
DIM p as UInteger = @a(0, 0, 0)
7+
DIM i as UInteger
8+
DIM j as UInteger
9+
DIM k as UInteger
10+
DIM m as UInteger
11+
12+
FOR i = 0 TO 7
13+
FOR j = 0 TO 19
14+
FOR k = 0 TO 11
15+
16+
LET m = i * j * k
17+
LET a(i, j, k) = m
18+
PRINT AT 2, 0; i; " "; j; " "; k; " "
19+
20+
IF PEEK(UInteger, p) <> m THEN
21+
REPORT_FAIL
22+
END IF
23+
24+
LET p = p + 2
25+
26+
NEXT k
27+
NEXT j
28+
NEXT i
29+
30+
REPORT_OK
6.75 KB
Binary file not shown.

0 commit comments

Comments
 (0)