1 ! Copyright (C) 2006 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: arrays kernel match namespaces tools.test ;
9 { f } [ { ?a ?a } { 1 2 } match ] unit-test
11 { H{ { ?a 1 } { ?b 2 } } } [
12 { ?a ?b } { 1 2 } match
18 { { ?a ?b } [ ?a ?b 2array ] }
52 1 2 <foo> T{ foo f ?a ?b } match [
58 1 2 <foo> \ ?a \ ?b <foo> match [
83 ] [ no-match-cond? ] must-fail-with
93 { "a" 1 2 "b" } { _ ?a ?b _ } { ?b ?a } match-replace
96 TUPLE: match-replace-test a b ;
99 T{ match-replace-test f 2 1 }
101 T{ match-replace-test f 1 2 }
102 T{ match-replace-test f ?a ?b }
103 T{ match-replace-test f ?b ?a }