通过原有功能的单元测试。

This commit is contained in:
zhengchao
2020-06-16 21:31:26 +08:00
parent 469539ab5a
commit df19a8ce71
23 changed files with 454 additions and 229 deletions

View File

@@ -38,11 +38,16 @@ void Maat_garbage_bin_free(struct Maat_garbage_bin* bin)
p->garbage_free(p->garbage);
TAILQ_REMOVE(&bin->garbage_q, p, entries);
free(p);
bin->bag_cnt--;
}
free(bin);
return;
}
size_t Maat_garbage_bin_get_size(struct Maat_garbage_bin* bin)
{
return bin->bag_cnt;
}
void Maat_garbage_bagging(struct Maat_garbage_bin* bin, void* garbage, void (* func)(void *))
{
struct Maat_garbage_bag* bag=ALLOC( struct Maat_garbage_bag, 1);