1 IN: multi-methods.tests
2 USING: multi-methods tools.test math sequences namespaces system
5 [ { POSTPONE: f integer } ] [ { f integer } canonicalize-specializer-0 ] unit-test
12 { integer { cpu x86 } sequence } canonicalize-specializer-1 ;
14 [ { { -2 integer } { -1 sequence } { cpu x86 } } ] [
21 [ { { 0 integer } { 1 sequence } { 2 x86 } } ] [
25 canonicalize-specializer-2
29 [ { integer sequence x86 } ] [
33 canonicalize-specializer-2
34 args get hooks get length + total set
35 canonicalize-specializer-3
41 { { { cpu x86 } { os linux } } "a" }
42 { { { cpu ppc } } "b" }
43 { { string { os windows } } "c" }
48 { { object x86 linux } "a" }
49 { { object ppc object } "b" }
50 { { string object windows } "c" }
54 example-1 canonicalize-specializers
59 { { object x86 linux } [ drop drop "a" ] }
60 { { object ppc object } [ drop drop "b" ] }
61 { { string object windows } [ drop drop "c" ] }
63 [ \ cpu get \ os get ]
65 example-1 prepare-methods