mirror of
https://github.com/bkthomps/Containers.git
synced 2026-03-27 13:29:52 +00:00
Reduce malloc calls in stack (#78)
This commit is contained in:
14
tst/stack.c
14
tst/stack.c
@@ -67,23 +67,9 @@ static void test_automated_trim(void)
|
||||
assert(!stack_destroy(me));
|
||||
}
|
||||
|
||||
#if STUB_MALLOC
|
||||
static void test_init_out_of_memory(void)
|
||||
{
|
||||
fail_malloc = 1;
|
||||
assert(!stack_init(sizeof(int)));
|
||||
delay_fail_malloc = 1;
|
||||
fail_malloc = 1;
|
||||
assert(!stack_init(sizeof(int)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void test_stack(void)
|
||||
{
|
||||
test_invalid_init();
|
||||
test_basic();
|
||||
test_automated_trim();
|
||||
#if STUB_MALLOC
|
||||
test_init_out_of_memory();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user