sequences.extras: Add unit tests. Fix using.

db4
Doug Coleman 2012-09-11 14:52:37 -07:00
parent 837568c793
commit ce63288c07
2 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,6 @@
USING: arrays ascii kernel make math math.vectors random USING: arrays ascii io io.streams.string kernel make math
sequences sequences.extras strings tools.test ; math.vectors random sequences sequences.extras strings
tools.test ;
IN: sequences.extras.tests 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 } [ 4 = ] fourth? ] unit-test
{ t } [ { 1 2 3 4 5 } [ 5 = ] last? ] unit-test { t } [ { 1 2 3 4 5 } [ 5 = ] last? ] unit-test
{ t } [ 4 { 1 2 3 4 5 } [ 5 = ] nth? ] 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

View File

@ -1,5 +1,6 @@
USING: accessors arrays assocs fry grouping kernel locals math USING: accessors arrays assocs fry grouping kernel locals make
math.order math.ranges sequences sequences.private splitting ; math math.order math.ranges sequences sequences.private
splitting ;
FROM: sequences => change-nth ; FROM: sequences => change-nth ;
IN: sequences.extras IN: sequences.extras