]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/combinators/smart/smart-tests.factor
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
[factor.git] / basis / combinators / smart / smart-tests.factor
index dd803bb2a07881ece08c441f900c5b114f4a1fe3..33523a01546c839865a8268d6ced387a3af2c29c 100644 (file)
@@ -8,33 +8,33 @@ IN: combinators.smart.tests
     10 [ 1 - ] [ 1 + ] bi ;
 
 [ [ test-bi ] output>array ] must-infer
-[ { 9 11 } ] [ [ test-bi ] output>array ] unit-test
+{ { 9 11 } } [ [ test-bi ] output>array ] unit-test
 
 [ { 9 11 } [ + ] input<sequence ] must-infer
-[ 20 ] [ { 9 11 } [ + ] input<sequence ] unit-test
+{ 20 } [ { 9 11 } [ + ] input<sequence ] unit-test
 
-[ 6 ] [ [ 1 2 3 ] [ + ] reduce-outputs ] unit-test
+{ 6 } [ [ 1 2 3 ] [ + ] reduce-outputs ] unit-test
 
 [ [ 1 2 3 ] [ + ] reduce-outputs ] must-infer
 
-[ 6 ] [ [ 1 2 3 ] sum-outputs ] unit-test
+{ 6 } [ [ 1 2 3 ] sum-outputs ] unit-test
 
-[ "ab" ]
+{ "ab" }
 [
     [ "a" "b" ] "" append-outputs-as
 ] unit-test
 
-[ "" ]
+{ "" }
 [
     [ ] "" append-outputs-as
 ] unit-test
 
-[ { } ]
+{ { } }
 [
     [ ] append-outputs
 ] unit-test
 
-[ B{ 1 2 3 } ]
+{ B{ 1 2 3 } }
 [
     [ { 1 } { 2 } { 3 } ] B{ } append-outputs-as
 ] unit-test
@@ -45,9 +45,9 @@ IN: combinators.smart.tests
 
 \ nested-smart-combo-test def>> must-infer
 
-[ { { 1 2 } { 3 4 } } ] [ nested-smart-combo-test ] unit-test
+{ { { 1 2 } { 3 4 } } } [ nested-smart-combo-test ] unit-test
 
-[ 14 ] [ [ 1 2 3 ] [ sq ] [ + ] map-reduce-outputs ] unit-test
+{ 14 } [ [ 1 2 3 ] [ sq ] [ + ] map-reduce-outputs ] unit-test
 
 { 2 3 } [ [ + ] preserving ] must-infer-as
 
@@ -58,34 +58,34 @@ IN: combinators.smart.tests
 : smart-if-test ( a b -- b )
     [ < ] [ swap - ] [ - ] smart-if ;
 
-[ 7 ] [ 10 3 smart-if-test ] unit-test
-[ 16 ] [ 25 41 smart-if-test ] unit-test
+{ 7 } [ 10 3 smart-if-test ] unit-test
+{ 16 } [ 25 41 smart-if-test ] unit-test
 
-[ { 1 2 } { 3 4 } { 5 6 } ] [ 1 2 3 4 5 6 [ 2array ] 3 smart-apply ] unit-test
-[ { 1 2 3 } { 4 5 6 } ] [ 1 2 3 4 5 6 [ 3array ] 2 smart-apply ] unit-test
+{ { 1 2 } { 3 4 } { 5 6 } } [ 1 2 3 4 5 6 [ 2array ] 3 smart-apply ] unit-test
+{ { 1 2 3 } { 4 5 6 } } [ 1 2 3 4 5 6 [ 3array ] 2 smart-apply ] unit-test
 
-[ 4 ] [ 2 [ even? ] [ 2 + ] smart-when ] unit-test
-[ 3 ] [ 3 [ even? ] [ 2 + ] smart-when ] unit-test
-[ 4 ] [ 2 [ odd? ] [ 2 + ] smart-unless ] unit-test
-[ 3 ] [ 3 [ odd? ] [ 2 + ] smart-unless ] unit-test
+{ 4 } [ 2 [ even? ] [ 2 + ] smart-when ] unit-test
+{ 3 } [ 3 [ even? ] [ 2 + ] smart-when ] unit-test
+{ 4 } [ 2 [ odd? ] [ 2 + ] smart-unless ] unit-test
+{ 3 } [ 3 [ odd? ] [ 2 + ] smart-unless ] unit-test
 
-[ 4 ] [ 2 [ even? ] [ 2 + ] smart-when* ] unit-test
-[ ] [ 3 [ even? ] [ 2 + ] smart-when* ] unit-test
-[ 3 ] [ 2 [ odd? ] [ 3 ] smart-unless* ] unit-test
-[ 3 ] [ 3 [ odd? ] [ 5 ] smart-unless* ] unit-test
+{ 4 } [ 2 [ even? ] [ 2 + ] smart-when* ] unit-test
+{ } [ 3 [ even? ] [ 2 + ] smart-when* ] unit-test
+{ 3 } [ 2 [ odd? ] [ 3 ] smart-unless* ] unit-test
+{ 3 } [ 3 [ odd? ] [ 5 ] smart-unless* ] unit-test
 
-[ -1 ] [ 1 2 [ + odd? ] [ - ] smart-when* ] unit-test
-[ ] [ 2 2 [ + odd? ] [ ] smart-unless* ] unit-test
+{ -1 } [ 1 2 [ + odd? ] [ - ] smart-when* ] unit-test
+{ } [ 2 2 [ + odd? ] [ ] smart-unless* ] unit-test
 
-[ ( -- x ) ] [ [ [ ] [ call ] curry output>array ] infer ] unit-test
+{ ( -- x ) } [ [ [ ] [ call ] curry output>array ] infer ] unit-test
 
 :: map-reduce-test ( a b c -- d ) [ a b c ] [ a - ] [ b * + ] map-reduce-outputs ;
 
-[ 10 ] [ 1 2 3 map-reduce-test ] unit-test
+{ 10 } [ 1 2 3 map-reduce-test ] unit-test
 
-[ ( x x -- x ) ] [ [ curry inputs ] infer ] unit-test
+{ ( x x -- x ) } [ [ curry inputs ] infer ] unit-test
 
-[ ( x -- x ) ] [ [ [ curry ] curry inputs ] infer ] unit-test
+{ ( x -- x ) } [ [ [ curry ] curry inputs ] infer ] unit-test
 
 { 1 1 1 } [ 1 3 [ ] smart-with times ] unit-test
 { "BCD" } [ 1 "ABC" [ + ] smart-with map ] unit-test