]> gitweb.factorcode.org Git - factor.git/blob - extra/math/combinators/combinators-tests.factor
a8448d6d6b9d7fe44fc551637ce3d44057e77fe3
[factor.git] / extra / math / combinators / combinators-tests.factor
1 ! Copyright (C) 2013 Loryn Jenkins.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel math math.combinators tools.test ;
4 IN: math.combinators.tests
5
6 [ 0 ] [ -3 [ drop 0 ] when-negative ] unit-test
7 [ -2 ] [ -3 [ 1 + ] when-negative ] unit-test
8 [ 2 ] [ 2 [ 0 ] when-negative ] unit-test
9
10 [ 0 ] [ 3 [ drop 0 ] when-positive ] unit-test
11 [ 4 ] [ 3 [ 1 + ] when-positive ] unit-test
12 [ -2 ] [ -2 [ 0 ] when-positive ] unit-test