Skip to content

Commit 160ddf6

Browse files
committed
Add runtime test arrcheck1
1 parent 8ee37f1 commit 160ddf6

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11

2+
#include "lib/tst_framework.bas"
3+
4+
INIT("Testing global array(i, j)")
5+
26
DIM a(23, 31) as Uinteger
37
DIM p as UInteger = @a(0, 0)
48
DIM i as Uinteger
59
DIM j as UInteger
610
DIM m as UInteger
7-
CLS
811

912
FOR i = 0 TO 23
1013
FOR j = 0 TO 31
1114
LET m = i * 32 + j
1215
LET a(i, j) = m
13-
PRINT AT 0, 0; i; " "; j; " "; " "
16+
PRINT AT 2, 0; i; " "; j; " "; " "
1417
IF PEEK(UInteger, p) <> m THEN
15-
PRINT INK 2; FLASH 1; " ERROR "
1618
PRINT "Expected "; m; ", got "; PEEK(Uinteger, p); ", read: "; a(i, j)
17-
STOP
19+
REPORT_FAIL
1820
END IF
1921
LET p = p + 2
2022
NEXT j
2123
NEXT i
2224

23-
PRINT INK 4; FLASH 1; " OK "
24-
25+
REPORT_OK
6.75 KB
Binary file not shown.

0 commit comments

Comments
 (0)