-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathday10_tests.tal
51 lines (37 loc) · 1.28 KB
/
day10_tests.tal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
~library/macros.tal
~library/devices.tal
( variables )
|0000
|0100 @program
P< "check_line: >P LF ( EXPECT check_line: )
S< "< 0a >S ;test-check-line JSR2 ( EXPECT < > 4 )
STKCHK
S< "<<<>> 0a >S ;test-check-line JSR2 ( EXPECT <<<>> > 4 )
STKCHK
S< "[[ 0a >S ;test-check-line JSR2 ( EXPECT [[ ]] 12 )
STKCHK
S< "[[] 0a >S ;test-check-line JSR2 ( EXPECT [[] ] 2 )
STKCHK
S< "[({(<(())[]>[[{[]{<()<>> 0a >S ;test-check-line JSR2 ( EXPECT [({(<(())[]>[[{[]{<()<>> }}]])})] 288957 )
S< "((]] 0a >S ;test-check-line JSR2 ( EXPECT ((] 0 )
;get-byte-from-test-input JSR2 DBGBYTE POP ( EXPECT 0x00 )
STKCHK
;eof-line ;test-check-line JSR2 ( EXPECT eof )
STKCHK
P< "👍 0a >P
( EXPECT 👍 )
BRK !
@eof-line 00
@test-check-line
;setup-test-input JSR2 ;check-line JSR2
( score* )
DUP2 #ffff EQU2 ,&no-score JCN
;print64 JSR2
,&done JMP
&no-score
POP2 P< "eof >P
&done
LF
RTN
~day10_lib.tal
~library/test.tal