2007-09-20 18:09:08 -04:00
|
|
|
USING: compiler definitions generic assocs inference math
|
|
|
|
namespaces parser tools.test words kernel sequences arrays io
|
2007-11-15 17:29:00 -05:00
|
|
|
effects tools.test.inference ;
|
2007-09-20 18:09:08 -04:00
|
|
|
IN: temporary
|
|
|
|
|
|
|
|
parse-hook get [
|
|
|
|
DEFER: foo \ foo reset-generic
|
|
|
|
DEFER: bar \ bar reset-generic
|
|
|
|
|
2007-11-15 17:29:00 -05:00
|
|
|
[ ] [ \ foo [ 1 2 ] define-compound ] unit-test
|
|
|
|
{ 0 2 } [ foo ] unit-test-effect
|
|
|
|
[ ] [ \ foo compile ] unit-test
|
2007-09-20 18:09:08 -04:00
|
|
|
[ ] [ \ bar [ foo foo ] define-compound ] unit-test
|
2007-11-15 17:29:00 -05:00
|
|
|
[ ] [ \ bar compile ] unit-test
|
|
|
|
[ ] [ \ foo [ 1 2 3 ] define-compound ] unit-test
|
|
|
|
[ t ] [ \ bar changed-words get key? ] unit-test
|
2007-09-20 18:09:08 -04:00
|
|
|
[ ] [ recompile ] unit-test
|
2007-11-15 17:29:00 -05:00
|
|
|
{ 0 3 } [ foo ] unit-test-effect
|
|
|
|
[ f ] [ \ bar changed-words get key? ] unit-test
|
|
|
|
[ ] [ \ bar [ 1 2 ] define-compound ] unit-test
|
|
|
|
[ t ] [ \ bar changed-words get key? ] unit-test
|
2007-09-20 18:09:08 -04:00
|
|
|
[ ] [ recompile ] unit-test
|
2007-11-15 17:29:00 -05:00
|
|
|
{ 0 2 } [ bar ] unit-test-effect
|
|
|
|
[ f ] [ \ bar changed-words get key? ] unit-test
|
|
|
|
[ ] [ \ foo [ 1 2 3 ] define-compound ] unit-test
|
|
|
|
[ f ] [ \ bar changed-words get key? ] unit-test
|
|
|
|
[ ] [ \ bar [ 1 2 3 ] define-compound ] unit-test
|
|
|
|
[ t ] [ \ bar changed-words get key? ] unit-test
|
2007-09-20 18:09:08 -04:00
|
|
|
[ ] [ \ bar forget ] unit-test
|
2007-11-15 17:29:00 -05:00
|
|
|
[ f ] [ \ bar changed-words get key? ] unit-test
|
2007-09-20 18:09:08 -04:00
|
|
|
|
|
|
|
: xy ;
|
|
|
|
: yx xy ;
|
|
|
|
|
|
|
|
\ yx compile
|
|
|
|
|
|
|
|
\ xy [ 1 ] define-compound
|
|
|
|
|
|
|
|
[ ] [ recompile ] unit-test
|
|
|
|
|
|
|
|
[ 1 ] [ yx ] unit-test
|
|
|
|
] when
|