]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/combinators/smart/smart-tests.factor
factor: trim using lists
[factor.git] / basis / combinators / smart / smart-tests.factor
index 33523a01546c839865a8268d6ced387a3af2c29c..e8f746140458c21937ace2fc041a25823f43675d 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2009 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs combinators.smart kernel math
-sequences stack-checker tools.test locals ;
+USING: accessors arrays assocs combinators.smart kernel
+math random sequences stack-checker tools.test ;
 IN: combinators.smart.tests
 
 : test-bi ( -- 9 11 )
@@ -123,3 +123,9 @@ IN: combinators.smart.tests
         { [ + ] [ + ] }
     } smart-2map-reduce
 ] unit-test
+
+{ { 1 2 3 4 } 5 6 } [ [ 1 2 3 4 5 6 ] 2 output>array-n ] unit-test
+{ { } 5 6 } [ [ 5 6 ] 2 output>array-n ] unit-test
+{ { 1 2 } 3 4 5 6 } [ [ 1 2 3 4 5 6 ] 4 output>array-n ] unit-test
+
+{ t } [ [ 10 random dup even? ] smart-loop odd? ] unit-test