mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-17 09:38:05 +11:00
10 lines
254 B
Forth
10 lines
254 B
Forth
( Forth testing harness
|
|
"#" means "assert". We stop at first failure, indicating
|
|
the failure through IO on port 1 )
|
|
|
|
: fail SPC ." failed" LF 1 1 PC! BYE ;
|
|
|
|
: # IF SPC ." pass" LF ELSE fail THEN ;
|
|
|
|
: #eq 2DUP SWAP . SPC '=' EMIT SPC . '?' EMIT = # ;
|