1 ! Copyright (C) 2006 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test match namespaces arrays ;
8 [ f ] [ { ?a ?a } { 1 2 } match ] unit-test
10 [ H{ { ?a 1 } { ?b 2 } } ] [
11 { ?a ?b } { 1 2 } match
17 { { ?a ?b } [ ?a ?b 2array ] }
51 1 2 <foo> T{ foo f ?a ?b } match [
57 1 2 <foo> \ ?a \ ?b <foo> match [
75 { "a" 1 2 "b" } { _ ?a ?b _ } { ?b ?a } match-replace
78 TUPLE: match-replace-test a b ;
81 T{ match-replace-test f 2 1 }
83 T{ match-replace-test f 1 2 }
84 T{ match-replace-test f ?a ?b }
85 T{ match-replace-test f ?b ?a }