]> gitweb.factorcode.org Git - factor.git/blob - extra/assocs/lib/lib-tests.factor
FUEL: Fix bug whereby true display-stacks? could hang the listener.
[factor.git] / extra / assocs / lib / lib-tests.factor
1 USING: kernel tools.test sequences vectors assocs.lib ;
2 IN: assocs.lib.tests
3
4 { 1 1 } [ [ ?push ] histogram ] must-infer-as
5
6 ! substitute
7 [ { 2 } ] [ { 1 } H{ { 1 2 } } [ ?at drop ] curry map ] unit-test
8 [ { 3 } ] [ { 3 } H{ { 1 2 } } [ ?at drop ] curry map ] unit-test
9
10 [ 2 ] [ 1 H{ { 1 2 } } [ ] [ ] if-at ] unit-test
11 [ 3 ] [ 3 H{ { 1 2 } } [ ] [ ] if-at ] unit-test
12
13 [ "hi" ] [ 1 H{ { 1 2 } } [ drop "hi" ] when-at ] unit-test
14 [ 3 ] [ 3 H{ { 1 2 } } [ drop "hi" ] when-at ] unit-test
15 [ 2 ] [ 1 H{ { 1 2 } } [ drop "hi" ] unless-at ] unit-test
16 [ "hi" ] [ 3 H{ { 1 2 } } [ drop "hi" ] unless-at ] unit-test
17