1 ! (c)2010 Joe Groff bsd license
2 USING: assocs hashtables.identity kernel literals tools.test ;
3 IN: hashtables.identity.tests
5 CONSTANT: the-real-slim-shady "marshall mathers"
9 { $ the-real-slim-shady t }
10 { "marshall mathers" f }
13 : please-stand-up ( assoc key -- value )
16 [ t ] [ will the-real-slim-shady please-stand-up ] unit-test
17 [ t ] [ will clone the-real-slim-shady please-stand-up ] unit-test
19 [ 2 ] [ will assoc-size ] unit-test
20 [ { { "marshall mathers" f } } ] [
21 the-real-slim-shady will clone
22 [ delete-at ] [ >alist ] bi
25 t the-real-slim-shady identity-associate
26 t the-real-slim-shady identity-associate =
29 t the-real-slim-shady identity-associate
30 t "marshall mathers" identity-associate =
33 CONSTANT: same-as-it-ever-was "same as it ever was"
35 { IH{ { $ same-as-it-ever-was $ same-as-it-ever-was } } }
36 [ H{ { $ same-as-it-ever-was $ same-as-it-ever-was } } IH{ } assoc-like ] unit-test