]> gitweb.factorcode.org Git - factor.git/commitdiff
Move some unit tests from generic to generic.math
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 30 Apr 2009 04:36:05 +0000 (23:36 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 30 Apr 2009 04:36:05 +0000 (23:36 -0500)
core/generic/generic-tests.factor
core/generic/math/math-tests.factor [new file with mode: 0644]

index e7ae583aa6436cc6e90c5e8dc68eb42484bb118e..a63cab1c5c230c387b99add5b23e2aa14d20f3bf 100755 (executable)
@@ -96,15 +96,6 @@ M: shit big-generic-test "shit" ;
 
 [ t ] [ \ + math-generic? ] unit-test
 
-! Test math-combination
-[ [ [ >float ] dip ] ] [ \ real \ float math-upgrade ] unit-test
-[ [ >float ] ] [ \ float \ real math-upgrade ] unit-test
-[ [ [ >bignum ] dip ] ] [ \ fixnum \ bignum math-upgrade ] unit-test
-[ [ >float ] ] [ \ float \ integer math-upgrade ] unit-test
-[ number ] [ \ number \ float math-class-max ] unit-test
-[ float ] [ \ real \ float math-class-max ] unit-test
-[ fixnum ] [ \ fixnum \ null math-class-max ] unit-test
-
 ! Regression
 TUPLE: first-one ;
 TUPLE: second-one ;
diff --git a/core/generic/math/math-tests.factor b/core/generic/math/math-tests.factor
new file mode 100644 (file)
index 0000000..12baeb6
--- /dev/null
@@ -0,0 +1,16 @@
+IN: generic.math.tests
+USING: generic.math math tools.test ;
+
+! Test math-combination
+[ [ [ >float ] dip ] ] [ \ real \ float math-upgrade ] unit-test
+[ [ >float ] ] [ \ float \ real math-upgrade ] unit-test
+[ [ [ >bignum ] dip ] ] [ \ fixnum \ bignum math-upgrade ] unit-test
+[ [ >float ] ] [ \ float \ integer math-upgrade ] unit-test
+
+[ number ] [ \ number \ float math-class-max ] unit-test
+[ float ] [ \ real \ float math-class-max ] unit-test
+[ fixnum ] [ \ fixnum \ null math-class-max ] unit-test
+[ bignum ] [ \ fixnum \ bignum math-class-max ] unit-test
+[ number ] [ \ fixnum \ number math-class-max ] unit-test
+
+