2020-03-19 15:43:48 -04:00
|
|
|
( 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 ;
|
|
|
|
|
2020-03-29 09:10:23 -04:00
|
|
|
: # IF SPC ." pass" LF ELSE fail THEN ;
|
2020-03-19 15:43:48 -04:00
|
|
|
|
|
|
|
: #eq 2DUP SWAP . SPC '=' EMIT SPC . '?' EMIT = # ;
|