]> gitweb.factorcode.org Git - factor.git/blob - core/generic/math/math-tests.factor
factor: Retrying on the unit tests. Also normalize some syntax with FUNCTION:.
[factor.git] / core / generic / math / math-tests.factor
1 USING: generic.math math tools.test kernel ;
2 IN: generic.math.tests
3
4 ! Test math-combination
5 { [ [ >float ] dip ] } [ \ real \ float math-upgrade ] unit-test
6 { [ >float ] } [ \ float \ real math-upgrade ] unit-test
7 { [ [ >bignum ] dip ] } [ \ fixnum \ bignum math-upgrade ] unit-test
8 { [ >float ] } [ \ float \ integer math-upgrade ] unit-test
9
10 { number } [ number float math-class-max ] unit-test
11 { number } [ float number math-class-max ] unit-test
12 { float } [ real float math-class-max ] unit-test
13 { float } [ float real math-class-max ] unit-test
14 { fixnum } [ fixnum null math-class-max ] unit-test
15 { fixnum } [ null fixnum math-class-max ] unit-test
16 { bignum } [ fixnum bignum math-class-max ] unit-test
17 { bignum } [ bignum fixnum math-class-max ] unit-test
18 { number } [ fixnum number math-class-max ] unit-test
19 { number } [ number fixnum math-class-max ] unit-test
20
21 { t } [ \ + math-generic? ] unit-test