]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/memory/memory-tests.factor
more test IN: cleanup.
[factor.git] / basis / tools / memory / memory-tests.factor
1 USING: arrays assocs kernel math memory namespaces parser sequences
2 tools.memory tools.memory.private tools.test tools.time vm ;
3
4 { } [ room. ] unit-test
5 { } [ heap-stats. ] unit-test
6 { t } [ [ gc gc ] collect-gc-events array? ] unit-test
7 { } [ gc-events. ] unit-test
8 { } [ gc-stats. ] unit-test
9 { } [ gc-summary. ] unit-test
10 { } [ callback-room. ] unit-test
11
12 ! Each gc-event must reclaim something. #659
13 { f } [
14     [ "resource:basis/tools/memory/memory.factor" run-file ] time
15     gc-events get [ space-reclaimed 0 < ] any?
16 ] unit-test
17
18 { t t t } [
19     get-code-blocks code-block-stats nip
20     [ CODE-BLOCK-UNOPTIMIZED of 0 > ]
21     [ CODE-BLOCK-OPTIMIZED of 0 > ]
22     [ CODE-BLOCK-PIC of 0 > ] tri
23 ] unit-test