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