1 USING: accessors central destructors kernel math tools.test ;
7 [ 3 ] [ 3 [ test-central ] with-test-central ] unit-test
9 TUPLE: test-disp-cent value disposed ;
11 ! A phony destructor that adds 1 to the value so we can make sure it got called.
12 M: test-disp-cent dispose* dup value>> 1+ >>value drop ;
14 DISPOSABLE-CENTRAL: t-d-c
17 test-disp-cent new 3 >>value [ t-d-c ] with-t-d-c value>> ;
19 [ 4 ] [ test-t-d-c ] unit-test