6#if !LWIP_STATS || !MEM_STATS
7#error "This tests needs MEM-statistics enabled"
10#error "This test needs DNS turned off (as it mallocs on init)"
39 fail(
"This test needs DNS turned off (as it mallocs on init)");
42 fail_unless(lwip_stats.mem.used == 0);
45 fail_unless(p1 !=
NULL);
46 fail_unless(lwip_stats.mem.used >=
SIZE1);
47 s1 = lwip_stats.mem.used;
50 fail_unless(p2 !=
NULL);
51 fail_unless(lwip_stats.mem.used >=
SIZE2 +
s1);
52 s2 = lwip_stats.mem.used;
57 fail_unless(lwip_stats.mem.used <=
s2 -
SIZE2);
60 fail_unless(lwip_stats.mem.used == 0);
#define LWIP_UNUSED_ARG(x)
#define mem_free(ptr, bsize)
#define mem_trim(_m_, _s_)
void * mem_malloc(mem_size_t size)
static Suite * create_suite(const char *name, TFun *tests, size_t num_tests, SFun setup, SFun teardown)
static struct test_info tests[]
static void mem_teardown(void)
END_TEST Suite * mem_suite(void)
static void mem_setup(void)