]> gitweb.factorcode.org Git - factor.git/blob - basis/sequences/complex-components/complex-components-tests.factor
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
[factor.git] / basis / sequences / complex-components / complex-components-tests.factor
1 USING: sequences.complex-components
2 kernel sequences tools.test arrays accessors ;
3 IN: sequences.complex-components.tests
4
5 : test-array ( -- x )
6     { C{ 1.0 2.0 } 3.0 C{ 5.0 6.0 } } <complex-components> ;
7
8 { 6 } [ test-array length ] unit-test
9
10 { 1.0 } [ test-array first  ] unit-test
11 { 2.0 } [ test-array second ] unit-test
12 { 3.0 } [ test-array third  ] unit-test
13 { 0   } [ test-array fourth ] unit-test
14
15 { { 1.0 2.0 3.0 0 5.0 6.0 } } [ test-array >array ] unit-test