(fix of commit
6e0590ef1)
Issue Unity-Technologies#37 (bdwgc).
* tests/test_cpp.cc (C::Test): Call GC_gcollect() if incremental mode
and nFreed is too low.
left = right = 0;
level = -123456;}
static void Test() {
+ if (GC_is_incremental_mode() && nFreed < (nAllocated / 5) * 4) {
+ // An explicit GC might be needed to reach the expected number
+ // of the finalized objects.
+ GC_gcollect();
+ }
my_assert(nFreed <= nAllocated);
my_assert(nFreed >= (nAllocated / 5) * 4 || GC_get_find_leak());
}