factor/extra/multi-methods/tests/definitions.factor

31 lines
879 B
Factor
Raw Normal View History

2008-04-08 19:51:56 -04:00
USING: multi-methods tools.test math sequences namespaces system
kernel strings words compiler.units quotations ;
2009-08-17 20:05:13 -04:00
IN: multi-methods.tests
2008-04-08 19:51:56 -04:00
DEFER: fake
\ fake H{ } clone "multi-methods" set-word-prop
<< ( -- ) \ fake set-stack-effect >>
2008-04-08 19:51:56 -04:00
2009-11-14 00:00:50 -05:00
[
[ "fake-{ }" ] [ { } \ fake method-word-name ] unit-test
2008-04-08 19:51:56 -04:00
2009-11-14 00:00:50 -05:00
[ H{ { "multi-method-generic" fake } { "multi-method-specializer" { } } } ]
[ { } \ fake method-word-props ] unit-test
2008-04-08 19:51:56 -04:00
2009-11-14 00:00:50 -05:00
[ t ] [ { } \ fake <method> method-body? ] unit-test
2008-04-08 19:51:56 -04:00
2008-12-18 01:42:12 -05:00
[ { } [ ] ] [ \ fake methods prepare-methods [ sort-methods ] dip ] unit-test
2008-04-08 19:51:56 -04:00
2008-04-08 20:12:48 -04:00
[ t ] [ { } \ fake multi-dispatch-quot callable? ] unit-test
2008-04-08 19:51:56 -04:00
[ t ] [ \ fake make-generic quotation? ] unit-test
[ ] [ \ fake update-generic ] unit-test
DEFER: testing
[ ] [ \ testing ( -- ) define-generic ] unit-test
2008-04-08 19:51:56 -04:00
[ t ] [ \ testing generic? ] unit-test
] with-compilation-unit