]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/sequences/deep/deep-tests.factor
factor: second stab at [ ] [ ] unit-test -> { } [ ] unit-test
[factor.git] / basis / sequences / deep / deep-tests.factor
index 5b6d8784af690fde3e0d831063ad4756a659c4d2..b96a51699a528bb70c70b75fe45276bba5775e23 100644 (file)
@@ -2,44 +2,44 @@ USING: sequences.deep kernel tools.test strings math arrays
 namespaces make sequences ;
 IN: sequences.deep.tests
 
-[ [ "hello" 3 4 swap ] ] [ [ { "hello" V{ 3 4 } } swap ] flatten ] unit-test
+{ [ "hello" 3 4 swap ] } [ [ { "hello" V{ 3 4 } } swap ] flatten ] unit-test
 
 { "ABC" } [ { { 65 } 66 { { 67 } } } "" flatten-as ] unit-test
 
-[ "foo" t ] [ { { "foo" } "bar" } [ string? ] (deep-find) ] unit-test
+{ "foo" t } [ { { "foo" } "bar" } [ string? ] (deep-find) ] unit-test
 
-[ f f ] [ { { "foo" } "bar" } [ number? ] (deep-find) ] unit-test
+{ f f } [ { { "foo" } "bar" } [ number? ] (deep-find) ] unit-test
 
-[ { { "foo" } "bar" } t ] [ { { "foo" } "bar" } [ array? ] (deep-find) ] unit-test
+{ { { "foo" } "bar" } t } [ { { "foo" } "bar" } [ array? ] (deep-find) ] unit-test
 
 : change-something ( seq -- newseq )
     dup array? [ "hi" suffix ] [ "hello" append ] if ;
 
-[ { { "heyhello" "hihello" } "hihello" } ]
+{ { { "heyhello" "hihello" } "hihello" } }
 [ "hey" 1array 1array [ change-something ] deep-map ] unit-test
 
-[ { { "heyhello" "hihello" } } ]
+{ { { "heyhello" "hihello" } } }
 [ "hey" 1array 1array [ change-something ] deep-map! ] unit-test
 
-[ t ] [ "foo" [ string? ] deep-any?  ] unit-test
+{ t } [ "foo" [ string? ] deep-any?  ] unit-test
 
-[ "foo" ] [ "foo" [ string? ] deep-find ] unit-test
+{ "foo" } [ "foo" [ string? ] deep-find ] unit-test
 
-[ { { 1 2 } 1 2 } ] [ [ { 1 2 } [ , ] deep-each ] { } make ] unit-test
+{ { { 1 2 } 1 2 } } [ [ { 1 2 } [ , ] deep-each ] { } make ] unit-test
 
-[ t ]
+{ t }
 [ { { 1 2 3 } 4 } { { { 1 { { 1 2 3 } 4 } } } 2 } deep-member? ] unit-test
 
-[ t ]
+{ t }
 [ { { 1 2 3 } 4 } { { { 1 2 3 } 4 } 2 } deep-member? ] unit-test
 
-[ f ]
+{ f }
 [ { 1 2 3 4 } { 1 2 3 { 4 } } deep-subseq? ] unit-test
 
-[ t ]
+{ t }
 [ { 1 2 3 4 } { 1 2 3 4 } deep-subseq? ] unit-test
 
-[ t ]
+{ t }
 [ { 1 2 3 4 } { { 1 2 3 4 } } deep-subseq? ] unit-test
 
 { 3 } [