factor/basis/math/ranges/ranges-tests.factor

28 lines
874 B
Factor
Raw Normal View History

2009-01-29 00:33:26 -05:00
USING: math math.ranges sequences sets tools.test arrays ;
2008-03-01 17:00:45 -05:00
IN: math.ranges.tests
2007-09-20 18:09:08 -04:00
[ { } ] [ 1 1 (a,b) >array ] unit-test
[ { } ] [ 1 1 (a,b] >array ] unit-test
[ { } ] [ 1 1 [a,b) >array ] unit-test
[ { 1 } ] [ 1 1 [a,b] >array ] unit-test
[ { } ] [ 1 2 (a,b) >array ] unit-test
[ { 2 } ] [ 1 2 (a,b] >array ] unit-test
[ { 1 } ] [ 1 2 [a,b) >array ] unit-test
[ { 1 2 } ] [ 1 2 [a,b] >array ] unit-test
2009-01-29 00:33:26 -05:00
[ { } ] [ 2 1 (a,b) >array ] unit-test
2007-09-20 18:09:08 -04:00
[ { 1 } ] [ 2 1 (a,b] >array ] unit-test
[ { 2 } ] [ 2 1 [a,b) >array ] unit-test
[ { 2 1 } ] [ 2 1 [a,b] >array ] unit-test
[ { 1 2 3 4 5 } ] [ 1 5 1 <range> >array ] unit-test
[ { 5 4 3 2 1 } ] [ 5 1 -1 <range> >array ] unit-test
[ { 0 1/3 2/3 1 } ] [ 0 1 1/3 <range> >array ] unit-test
[ { 0 1/3 2/3 1 } ] [ 1 0 -1/3 <range> >array reverse ] unit-test
2009-01-29 00:33:26 -05:00
[ 100 ] [
1 100 [a,b] [ 2^ [1,b] ] map members length
] unit-test