1 USING: kernel namespaces tools.test words ;
4 H{ } clone "test-namespace" set
6 : test-namespace ( -- ? )
7 H{ } clone dup [ namespace = ] bind ;
9 [ t ] [ test-namespace ] unit-test
13 [ H{ } clone [ f "some-global" set "some-global" get ] bind ]
16 SYMBOL: test-initialize
18 f test-initialize set-global
20 test-initialize [ 1 ] initialize
21 test-initialize [ 2 ] initialize
23 [ 1 ] [ test-initialize get-global ] unit-test
25 f test-initialize set-global
26 test-initialize [ 5 ] initialize
28 [ 5 ] [ test-initialize get-global ] unit-test