]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences.extras: Add unit tests. Fix using.
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 11 Sep 2012 21:52:37 +0000 (14:52 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 11 Sep 2012 21:54:51 +0000 (14:54 -0700)
extra/sequences/extras/extras-tests.factor
extra/sequences/extras/extras.factor

index 754d93788b7f08a0db597f64cbca88f087c21cb1..b051a159d1dce1432fad669aab6e2847c91954b5 100644 (file)
@@ -1,5 +1,6 @@
-USING: arrays ascii kernel make math math.vectors random
-sequences sequences.extras strings tools.test ;
+USING: arrays ascii io io.streams.string kernel make math
+math.vectors random sequences sequences.extras strings
+tools.test ;
 
 IN: sequences.extras.tests
 
@@ -137,3 +138,11 @@ IN: sequences.extras.tests
 { t } [ { 1 2 3 4 5 } [ 4 = ] fourth? ] unit-test
 { t } [ { 1 2 3 4 5 } [ 5 = ] last? ] unit-test
 { t } [ 4 { 1 2 3 4 5 } [ 5 = ] nth? ] unit-test
+
+{ { 97 115 100 102 } } [
+    "asdf" [ [ read1 ] loop>array ] with-string-reader
+] unit-test
+
+{ V{ 97 115 100 102 } } [
+    "asdf" [ [ read1 ] V{ } loop>sequence ] with-string-reader
+] unit-test
index 8c8571466330039d80e1355cd5eb87167cea9e86..3bebf46973a2c0ce7b6afc35491f805b1a348011 100644 (file)
@@ -1,5 +1,6 @@
-USING: accessors arrays assocs fry grouping kernel locals math
-math.order math.ranges sequences sequences.private splitting ;
+USING: accessors arrays assocs fry grouping kernel locals make
+math math.order math.ranges sequences sequences.private
+splitting ;
 FROM: sequences => change-nth ;
 IN: sequences.extras