1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-08 17:48:06 +11:00
collapseos/tests/forth/harness.fs
Virgil Dupras f0cbda1f2e tests: add Forth tests
Modest first step
2020-03-19 15:43:48 -04:00

10 lines
247 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 ;
: # SKIP? fail SPC ." pass" LF ;
: #eq 2DUP SWAP . SPC '=' EMIT SPC . '?' EMIT = # ;