]> gitweb.factorcode.org Git - factor.git/commitdiff
combinators.extras: a few more tests for ?call.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 13 Nov 2020 04:41:44 +0000 (20:41 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 13 Nov 2020 04:41:44 +0000 (20:41 -0800)
extra/combinators/extras/extras-tests.factor

index a038e43f797ea64eefb393e085c0016b28479c1d..f3bda40cb600c87daa0580e2ca12fdf9cbd45f05 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2013 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: combinators.extras io.files kernel math sequences
+USING: assocs combinators.extras io.files kernel math sequences
 splitting tools.test ;
 
 { "a b" }
@@ -62,6 +62,9 @@ splitting tools.test ;
 ] unit-test
 
 { f } [ f { } ?call ] unit-test
+{ 3 } [ H{ { 1 H{ { 2 3 } } } } { [ 1 of ] [ 2 of ] } ?call ] unit-test
+{ f } [ H{ { 1 H{ { 3 4 } } } } { [ 1 of ] [ 2 of ] } ?call ] unit-test
+{ f } [ H{ { 2 H{ { 3 4 } } } } { [ 1 of ] [ 2 of ] } ?call ] unit-test
 { 5 } [
     "hello factor!" { [ " " split ] [ first ] [ length ] } ?call
 ] unit-test