factor/library/test/redefine.factor

29 lines
1.2 KiB
Factor
Raw Normal View History

USING: compiler definitions generic hashtables inference math
namespaces parser test words ;
IN: temporary
2005-03-26 20:40:29 -05:00
DEFER: foo \ foo reset-generic
DEFER: bar \ bar reset-generic
2005-03-26 20:40:29 -05:00
[ ] [ \ foo [ 1 2 ] define-compound ] unit-test
[ { 0 2 } ] [ [ foo ] infer ] unit-test
[ ] [ \ foo compile ] unit-test
[ ] [ \ bar [ foo foo ] define-compound ] unit-test
[ ] [ \ bar compile ] unit-test
[ ] [ \ foo [ 1 2 3 ] define-compound ] unit-test
[ t ] [ \ bar changed-words get hash-member? ] unit-test
[ ] [ recompile ] unit-test
[ { 0 3 } ] [ [ foo ] infer ] unit-test
[ f ] [ \ bar changed-words get hash-member? ] unit-test
[ ] [ \ bar [ 1 2 ] define-compound ] unit-test
[ t ] [ \ bar changed-words get hash-member? ] unit-test
[ ] [ recompile ] unit-test
[ { 0 2 } ] [ [ bar ] infer ] unit-test
[ f ] [ \ bar changed-words get hash-member? ] unit-test
[ ] [ \ foo [ 1 2 3 ] define-compound ] unit-test
[ f ] [ \ bar changed-words get hash-member? ] unit-test
[ ] [ \ bar [ 1 2 3 ] define-compound ] unit-test
[ t ] [ \ bar changed-words get hash-member? ] unit-test
[ ] [ \ bar forget ] unit-test
[ f ] [ \ bar changed-words get hash-member? ] unit-test