2004-08-19 19:36:28 -04:00
|
|
|
IN: scratchpad
|
2004-08-26 22:21:17 -04:00
|
|
|
USE: math
|
2004-08-19 19:36:28 -04:00
|
|
|
USE: test
|
|
|
|
|
USE: words
|
2004-09-28 00:24:36 -04:00
|
|
|
USE: namespaces
|
|
|
|
|
USE: logic
|
|
|
|
|
USE: lists
|
2004-08-19 19:36:28 -04:00
|
|
|
|
|
|
|
|
[ 4 ] [
|
|
|
|
|
"poo" "scratchpad" create [ 2 2 + ] define-compound
|
|
|
|
|
"poo" [ "scratchpad" ] search execute
|
|
|
|
|
] unit-test
|
2004-09-28 00:24:36 -04:00
|
|
|
|
|
|
|
|
: words-test ( -- ? )
|
|
|
|
|
t vocabs [ words [ word? and ] each ] each ;
|
|
|
|
|
|
|
|
|
|
[ t ] [ ] [ words-test ] test-word
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
: test-last ( -- ) ;
|
|
|
|
|
word word-name "last-word-test" set
|
|
|
|
|
|
|
|
|
|
[ "test-last" ] [ ] [ "last-word-test" get ] test-word
|
|
|
|
|
[ f ] [ 5 ] [ compound? ] test-word
|