Add test case for GC

db4
Slava Pestov 2008-04-05 02:08:45 -05:00
parent 6842a2829d
commit cfa1c02013
1 changed files with 10 additions and 1 deletions

View File

@ -1,8 +1,17 @@
USING: generic kernel kernel.private math memory prettyprint
sequences tools.test words namespaces layouts classes
classes.builtin ;
classes.builtin arrays quotations ;
IN: memory.tests
! Code GC wasn't kicking in when needed
: leak-step 800000 f <array> 1quotation call drop ;
: leak-loop 100 [ leak-step ] times ;
[ ] [ leak-step leak-step leak-step data-gc ] unit-test
[ ] [ leak-loop ] unit-test
TUPLE: testing x y z ;
[ save-image-and-exit ] must-fail