1 USING: multi-methods tools.test math sequences namespaces system
2 kernel strings words compiler.units quotations ;
3 IN: multi-methods.tests
6 \ fake H{ } clone "multi-methods" set-word-prop
7 << ( -- ) \ fake set-stack-effect >>
10 [ "fake-{ }" ] [ { } \ fake method-word-name ] unit-test
12 [ H{ { "multi-method-generic" fake } { "multi-method-specializer" { } } } ]
13 [ { } \ fake method-word-props ] unit-test
15 [ t ] [ { } \ fake <method> method-body? ] unit-test
17 [ { } [ ] ] [ \ fake methods prepare-methods [ sort-methods ] dip ] unit-test
19 [ t ] [ { } \ fake multi-dispatch-quot callable? ] unit-test
21 [ t ] [ \ fake make-generic quotation? ] unit-test
23 [ ] [ \ fake update-generic ] unit-test
27 [ ] [ \ testing ( -- ) define-generic ] unit-test
29 [ t ] [ \ testing generic? ] unit-test
30 ] with-compilation-unit