factor/extra/assocs/lib/lib-tests.factor

18 lines
609 B
Factor
Raw Normal View History

2008-08-17 22:54:10 -04:00
USING: kernel tools.test sequences vectors assocs.lib ;
2008-06-18 04:53:16 -04:00
IN: assocs.lib.tests
{ 1 1 } [ [ ?push ] histogram ] must-infer-as
2008-08-17 22:54:10 -04:00
! substitute
[ { 2 } ] [ { 1 } H{ { 1 2 } } [ ?at drop ] curry map ] unit-test
[ { 3 } ] [ { 3 } H{ { 1 2 } } [ ?at drop ] curry map ] unit-test
[ 2 ] [ 1 H{ { 1 2 } } [ ] [ ] if-at ] unit-test
[ 3 ] [ 3 H{ { 1 2 } } [ ] [ ] if-at ] unit-test
[ "hi" ] [ 1 H{ { 1 2 } } [ drop "hi" ] when-at ] unit-test
[ 3 ] [ 3 H{ { 1 2 } } [ drop "hi" ] when-at ] unit-test
[ 2 ] [ 1 H{ { 1 2 } } [ drop "hi" ] unless-at ] unit-test
[ "hi" ] [ 3 H{ { 1 2 } } [ drop "hi" ] unless-at ] unit-test