add a unit test for accumulate!

db4
Doug Coleman 2009-10-28 16:12:43 -05:00
parent def951ce9b
commit 3e9593d3c0
1 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,12 @@ IN: sequences.tests
[ 5040 { 1 1 2 6 24 120 720 } ]
[ { 1 2 3 4 5 6 7 } 1 [ * ] accumulate ] unit-test
[ 5040 { 1 1 2 6 24 120 720 } ]
[ { 1 2 3 4 5 6 7 } 1 [ * ] accumulate! ] unit-test
[ t ]
[ { 1 2 3 4 5 6 7 } dup 1 [ * ] accumulate! nip eq? ] unit-test
[ f f ] [ [ ] [ ] find ] unit-test
[ 0 1 ] [ [ 1 ] [ ] find ] unit-test
[ 1 "world" ] [ [ "hello" "world" ] [ "world" = ] find ] unit-test