]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.test: Fix unit-test~ and a couple of tests.
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 23 Jul 2017 16:50:52 +0000 (11:50 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 23 Jul 2017 16:50:52 +0000 (11:50 -0500)
basis/math/functions/functions-tests.factor
basis/tools/test/test.factor

index 3cb2febf54edd5f8c94660ffb7e874aafb03be69..a842efa3afb45c424fd5aa8c07963dfd7e7c178d 100644 (file)
@@ -82,16 +82,16 @@ CONSTANT: log10-factorial-1000 0x1.40f3593ed6f8ep11
 { 4.0 } [ 10000.0 log10 ] unit-test
 { $ log10-factorial-1000 t } [ 1000 factorial [ log10 ] [ bignum? ] bi ] unit-test
 
-{ e 1.e-10 } [ 1 e^ ] unit-test~
-{ 0/0. 1.e-10 } [ 1 e^ ] unit-test~
-{ 1.e-10 } [ 0/0. 1 e^ ] unit-test~
-{ e 1.e-10 } [ 1.0 e^ ] unit-test~
-{ 1.0 1.e-10 } [ -1 e^ e * ] unit-test~
+{ f } [ 1 e^ 0/0. 1.e-10 ~ ] unit-test
+{ f } [ 0/0. 1 e^ 1.e-10 ~ ] unit-test
 { f } [ 1/0. 1/0. 1.e-10 ~ ] unit-test
 { f } [ 1/0. -1/0. 1.e-10 ~ ] unit-test
 { f } [ 1/0. 0/0. 1.e-10 ~ ] unit-test
 { f } [ 0/0. -1/0. 1.e-10 ~ ] unit-test
 
+{ e 1.e-10 } [ 1 e^ ] unit-test~
+{ 1.0 1.e-10 } [ -1 e^ e * ] unit-test~
+
 { 1.0 } [ 0 cosh ] unit-test
 { 1.0 } [ 0.0 cosh ] unit-test
 { 0.0 } [ 1 acosh ] unit-test
index 8473b2d70f7d50f317279e2129a3168fe844ef41..821458cea5cf06fb10210ecaab502d66b9c0e2db 100644 (file)
@@ -67,7 +67,7 @@ SYMBOL: current-test-file
 : (unit-test-comparator) ( output input comparator -- error/f failed? tested? )
     swapd '[
         { } _ with-datastack
-        _ >quotation _ compose with-datastack f
+        _ >quotation _ compose with-datastack first dup not
     ] [ t ] recover t ; inline
 
 : (unit-test~) ( output input -- error/f failed? tested? )