]> gitweb.factorcode.org Git - factor.git/blob - basis/sequences/unrolled/unrolled-tests.factor
Update some copyright headers to follow the current convention
[factor.git] / basis / sequences / unrolled / unrolled-tests.factor
1 ! Copyright (C) 2010 Joe Groff.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: compiler.test compiler.tree.debugger kernel make math.parser sequences
4 sequences.unrolled tools.test ;
5 IN: sequences.unrolled.tests
6
7 { { "0" "1" "2" } } [ { 0 1 2 } 3 [ number>string ] unrolled-map ] unit-test
8 { { "0" "1" "2" } } [ { 0 1 2 } [ 3 [ number>string ] unrolled-map ] compile-call ] unit-test
9
10 { { "0" "1" "2" } } [ [ { 0 1 2 } 3 [ number>string , ] unrolled-each ] { } make ] unit-test
11 { { "0" "1" "2" } } [ [ { 0 1 2 } [ 3 [ number>string , ] unrolled-each ] compile-call ] { } make ] unit-test
12
13 { { "a0" "b1" "c2" } }
14 [ [ { "a" "b" "c" } 3 [ number>string append , ] unrolled-each-index ] { } make ] unit-test
15
16 { { "a0" "b1" "c2" } }
17 [ [ { "a" "b" "c" } [ 3 [ number>string append , ] unrolled-each-index ] compile-call ] { } make ] unit-test
18
19 { { "aI" "bII" "cIII" } }
20 [ [ { "a" "b" "c" } { "I" "II" "III" } [ 3 [ append , ] unrolled-2each ] compile-call ] { } make ] unit-test
21
22 { { "aI" "bII" "cIII" } }
23 [ { "a" "b" "c" } { "I" "II" "III" } 3 [ append ] unrolled-2map ] unit-test
24
25 { { "aI" "bII" "cIII" } }
26 [ { "a" "b" "c" } { "I" "II" "III" } [ 3 [ append ] unrolled-2map ] compile-call ] unit-test
27
28 { { "a0" "b1" "c2" } }
29 [ { "a" "b" "c" } 3 [ number>string append ] unrolled-map-index ] unit-test
30
31 { { "a0" "b1" "c2" } }
32 [ { "a" "b" "c" } [ 3 [ number>string append ] unrolled-map-index ] compile-call ] unit-test
33
34 [ { 0 1 2 } 4 [ number>string ] unrolled-map ] [ unrolled-bounds-error? ] must-fail-with
35 [ { 0 1 2 3 } { 0 1 2 } 4 [ number>string append ] unrolled-2map ] [ unrolled-2bounds-error? ] must-fail-with
36
37 { t }
38 [ [ 3 [ number>string ] unrolled-map ] { call } inlined? ] unit-test
39
40 { t }
41 [ [ 3 [ number>string , ] unrolled-each ] { call } inlined? ] unit-test
42
43 { t }
44 [ [ 3 [ number>string append , ] unrolled-each-index ] { call } inlined? ] unit-test
45
46 { t }
47 [ [ 3 [ append , ] unrolled-2each ] { call } inlined? ] unit-test
48
49 { t }
50 [ [ 3 [ append ] unrolled-2map ] { call } inlined? ] unit-test
51
52 { t }
53 [ [ 3 [ number>string append ] unrolled-map-index ] { call } inlined? ] unit-test