2 USING: boxes namespaces tools.test accessors ;
\r
4 [ ] [ <box> "b" set ] unit-test
\r
6 [ ] [ 3 "b" get >box ] unit-test
\r
8 [ t ] [ "b" get occupied>> ] unit-test
\r
10 [ 4 "b" >box ] must-fail
\r
12 [ 3 ] [ "b" get box> ] unit-test
\r
14 [ f ] [ "b" get occupied>> ] unit-test
\r
16 [ "b" get box> ] must-fail
\r
18 [ f f ] [ "b" get ?box ] unit-test
\r
20 [ ] [ 12 "b" get >box ] unit-test
\r
22 [ 12 t ] [ "b" get ?box ] unit-test
\r
24 [ f ] [ "b" get occupied>> ] unit-test
\r