PageRenderTime 21ms CodeModel.GetById 11ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 1ms

/extra/pairs/pairs-tests.factor

http://github.com/abeaumont/factor
Unknown | 23 lines | 20 code | 3 blank | 0 comment | 0 complexity | a87217296989ca070f30e96fb03e881b MD5 | raw file
 1IN: pairs.tests
 2USING: namespaces assocs tools.test pairs ;
 3
 4SYMBOL: blah
 5
 6"blah" blah <pair> "b" set
 7
 8[ "blah" t ] [ blah "b" get at* ] unit-test
 9[ f f ] [ "fdaf" "b" get at* ] unit-test
10[ 1 ] [ "b" get assoc-size ] unit-test
11[ { { blah "blah" } } ] [ "b" get >alist ] unit-test
12[ ] [ "bleah" blah "b" get set-at ] unit-test
13[ 1 ] [ "b" get assoc-size ] unit-test
14[ { { blah "bleah" } } ] [ "b" get >alist ] unit-test
15[ "bleah" t ] [ blah "b" get at* ] unit-test
16[ f f ] [ "fdaf" "b" get at* ] unit-test
17[ blah "b" get delete-at ] must-fail
18[ ] [ 1 2 "b" get set-at ] unit-test
19[ "bleah" t ] [ blah "b" get at* ] unit-test
20[ 1 t ] [ 2 "b" get at* ] unit-test
21[ f f ] [ "fdaf" "b" get at* ] unit-test
22[ 2 ] [ "b" get assoc-size ] unit-test
23[ { { 2 1 } { blah "bleah" } } ] [ "b" get >alist ] unit-test