]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/stack-checker/transforms/transforms-tests.factor
factor: second stab at [ ] [ ] unit-test -> { } [ ] unit-test
[factor.git] / basis / stack-checker / transforms / transforms-tests.factor
index 3c0fb988b78d8b19c5d46a5f4f3b388c3e19f457..2a0b5bfcb2e0547cf4ac8c3e1b648da54780ecfe 100644 (file)
@@ -7,7 +7,7 @@ MACRO: compose-n ( n word -- quot' ) <repetition> >quotation ;
 
 : compose-n-test ( a b c -- x ) 2 \ + compose-n ;
 
-[ 6 ] [ 1 2 3 compose-n-test ] unit-test
+{ 6 } [ 1 2 3 compose-n-test ] unit-test
 
 TUPLE: color r g b ;
 
@@ -18,21 +18,21 @@ C: <color> color
 
 { 1 3 } [ cleave-test ] must-infer-as
 
-[ 1 2 3 ] [ 1 2 3 <color> cleave-test ] unit-test
+{ 1 2 3 } [ 1 2 3 <color> cleave-test ] unit-test
 
-[ 1 2 3 ] [ 1 2 3 <color> \ cleave-test def>> call ] unit-test
+{ 1 2 3 } [ 1 2 3 <color> \ cleave-test def>> call ] unit-test
 
 : 2cleave-test ( a b -- c d e ) { [ 2array ] [ + ] [ - ] } 2cleave ;
 
-[ { 1 2 } 3 -1 ] [ 1 2 2cleave-test ] unit-test
+{ { 1 2 } 3 -1 } [ 1 2 2cleave-test ] unit-test
 
-[ { 1 2 } 3 -1 ] [ 1 2 \ 2cleave-test def>> call ] unit-test
+{ { 1 2 } 3 -1 } [ 1 2 \ 2cleave-test def>> call ] unit-test
 
 : spread-test ( a b c -- d e f ) { [ sq ] [ neg ] [ recip ] } spread ;
 
-[ 16 -3 1/6 ] [ 4 3 6 spread-test ] unit-test
+{ 16 -3 1/6 } [ 4 3 6 spread-test ] unit-test
 
-[ 16 -3 1/6 ] [ 4 3 6 \ spread-test def>> call ] unit-test
+{ 16 -3 1/6 } [ 4 3 6 \ spread-test def>> call ] unit-test
 
 [ fixnum instance? ] must-infer
 
@@ -70,8 +70,8 @@ MACRO: curry-folding-test ( quot -- )
 
 : member?-test ( a -- ? ) { 1 2 3 10 7 58 } member? ;
 
-[ f ] [ 1.0 member?-test ] unit-test
-[ t ] [ \ member?-test def>> first [ member?-test ] all? ] unit-test
+{ f } [ 1.0 member?-test ] unit-test
+{ t } [ \ member?-test def>> first [ member?-test ] all? ] unit-test
 
 ! Macro expansion should throw its own type of error
 : bad-macro ( -- ) ;