]> gitweb.factorcode.org Git - factor.git/blob - core/inference/transforms/transforms-tests.factor
Initial import
[factor.git] / core / inference / transforms / transforms-tests.factor
1 IN: temporary
2 USING: sequences inference.transforms tools.test math kernel
3 quotations ;
4
5 : compose-n-quot <repetition> >quotation ;
6 : compose-n compose-n-quot call ;
7 \ compose-n [ compose-n-quot ] 2 define-transform
8 : compose-n-test 2 \ + compose-n ;
9
10 [ 6 ] [ 1 2 3 compose-n-test ] unit-test
11
12 [ 0 ] [ { } bitfield-quot call ] unit-test
13
14 [ 256 ] [ 1 { 8 } bitfield-quot call ] unit-test
15
16 [ 268 ] [ 3 1 { 8 2 } bitfield-quot call ] unit-test
17
18 [ 268 ] [ 1 { 8 { 3 2 } } bitfield-quot call ] unit-test
19
20 [ 512 ] [ 1 { { 1+ 8 } } bitfield-quot call ] unit-test