]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/decimals/decimals-tests.factor
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
[factor.git] / extra / decimals / decimals-tests.factor
index 3b6ff627dba992ff4b6dc0380ac177624ccf8651..726212b0ea76afa5b43508dc00b803d8746dafc1 100644 (file)
@@ -5,7 +5,7 @@ math math.functions math.order math.ratios prettyprint random
 sequences tools.test kernel.private ;
 IN: decimals.tests
 
-[ t ] [
+{ t } [
     D: 12.34 D: 00012.34000 =
 ] unit-test
 
@@ -26,10 +26,10 @@ ERROR: decimal-test-failure D1 D2 quot ;
 : test-decimal-op ( quot1 quot2 -- ? )
     [ random-test-decimal random-test-decimal ] 2dip (test-decimal-op) ; inline
 
-[ t ] [ 1000 [ drop [ D+ ] [ + ] test-decimal-op ] all-integers? ] unit-test
-[ t ] [ 1000 [ drop [ D- ] [ - ] test-decimal-op ] all-integers? ] unit-test
-[ t ] [ 1000 [ drop [ D* ] [ * ] test-decimal-op ] all-integers? ] unit-test
-[ t ] [
+{ t } [ 1000 [ drop [ D+ ] [ + ] test-decimal-op ] all-integers? ] unit-test
+{ t } [ 1000 [ drop [ D- ] [ - ] test-decimal-op ] all-integers? ] unit-test
+{ t } [ 1000 [ drop [ D* ] [ * ] test-decimal-op ] all-integers? ] unit-test
+{ t } [
     1000 [
         drop
         [ [ 100 D/ ] [ /f ] test-decimal-op ]
@@ -37,16 +37,16 @@ ERROR: decimal-test-failure D1 D2 quot ;
     ] all-integers?
 ] unit-test
 
-[ t ] [
+{ t } [
     { D: 0. D: .0 D: 0.0 D: 00.00 D: . } all-equal?
 ] unit-test
 
-[ t ] [ T{ decimal f 90 0 } T{ decimal f 9 1 } = ] unit-test
+{ t } [ T{ decimal f 90 0 } T{ decimal f 9 1 } = ] unit-test
 
-[ t ] [ D: 1 D: 2 before? ] unit-test
-[ f ] [ D: 2 D: 2 before? ] unit-test
-[ f ] [ D: 3 D: 2 before? ] unit-test
-[ f ] [ D: -1 D: -2 before? ] unit-test
-[ f ] [ D: -2 D: -2 before? ] unit-test
-[ t ] [ D: -3 D: -2 before? ] unit-test
-[ t ] [ D: .5 D: 0 D: 1.0 between? ] unit-test
+{ t } [ D: 1 D: 2 before? ] unit-test
+{ f } [ D: 2 D: 2 before? ] unit-test
+{ f } [ D: 3 D: 2 before? ] unit-test
+{ f } [ D: -1 D: -2 before? ] unit-test
+{ f } [ D: -2 D: -2 before? ] unit-test
+{ t } [ D: -3 D: -2 before? ] unit-test
+{ t } [ D: .5 D: 0 D: 1.0 between? ] unit-test