-
Notifications
You must be signed in to change notification settings - Fork 222
Expand file tree
/
Copy pathdefinitions.factor
More file actions
30 lines (19 loc) · 879 Bytes
/
definitions.factor
File metadata and controls
30 lines (19 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
USING: multi-methods tools.test math sequences namespaces system
kernel strings words compiler.units quotations ;
IN: multi-methods.tests
DEFER: fake
\ fake H{ } clone "multi-methods" set-word-prop
<< \ fake ( -- ) set-stack-effect >>
[
[ "fake-{ }" ] [ { } \ fake method-word-name ] unit-test
[ H{ { "multi-method-generic" fake } { "multi-method-specializer" { } } } ]
[ { } \ fake method-word-props ] unit-test
[ t ] [ { } \ fake <method> method-body? ] unit-test
[ { } [ ] ] [ \ fake methods prepare-methods [ sort-methods ] dip ] unit-test
[ t ] [ { } \ fake multi-dispatch-quot callable? ] unit-test
[ t ] [ \ fake make-generic quotation? ] unit-test
[ ] [ \ fake update-generic ] unit-test
DEFER: testing
[ ] [ \ testing ( -- ) define-generic ] unit-test
[ t ] [ \ testing generic? ] unit-test
] with-compilation-unit