combinators.cleave-tests: add tests for arr

db4
Eduardo Cavazos 2008-07-05 07:52:50 -05:00
parent 0b6d405537
commit 05798b88d9
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
USING: kernel math math.functions tools.test combinators.cleave ;
IN: combinators.cleave.tests
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: unit-test* ( input output -- ) swap unit-test ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[ { [ 1 ] [ 2 ] [ 3 ] [ 4 ] } 0arr ] [ { 1 2 3 4 } ] unit-test*
[ 3 { 1+ 1- 2^ } 1arr ] [ { 4 2 8 } ] unit-test*
[ 3 4 { [ + ] [ - ] [ ^ ] } 2arr ] [ { 7 -1 81 } ] unit-test*
[ 1 2 3 { [ + + ] [ - - ] [ * * ] } 3arr ] [ { 6 2 6 } ] unit-test*