]> gitweb.factorcode.org Git - factor.git/blob - extra/slots/syntax/syntax-tests.factor
e4dac6e4a4927425f0483714842352d8f1c81cd9
[factor.git] / extra / slots / syntax / syntax-tests.factor
1 ! Copyright (C) 2010 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test slots.syntax ;
4 IN: slots.syntax.tests
5
6 TUPLE: slot-test a b c ;
7
8 [ 1 2 3 ] [ T{ slot-test f 1 2 3 } slots[ a b c ] ] unit-test
9 [ 3 ] [ T{ slot-test f 1 2 3 } slots[ c ] ] unit-test
10 [ ] [ T{ slot-test f 1 2 3 } slots[ ] ] unit-test
11
12 [ { 1 2 3 } ] [ T{ slot-test f 1 2 3 } slots{ a b c } ] unit-test
13 [ { 3 } ] [ T{ slot-test f 1 2 3 } slots{ c } ] unit-test
14 [ { } ] [ T{ slot-test f 1 2 3 } slots{ } ] unit-test