mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-12 12:45:35 +00:00
For wrong configurations, let the test fail instead of the compiler
This commit is contained in:
parent
04a8b0f85d
commit
f5d4f3d83c
@ -6,8 +6,8 @@
|
||||
#if !LWIP_STATS || !MEM_STATS
|
||||
#error "This tests needs MEM-statistics enabled"
|
||||
#endif
|
||||
#if LWIP_SNMP || LWIP_DNS
|
||||
#error "This test needs SNMP and DNS turned off (as they malloc on init)"
|
||||
#if LWIP_DNS
|
||||
/*#error "This test needs DNS turned off (as it mallocs on init)"*/
|
||||
#endif
|
||||
|
||||
/* Setups/teardown functions */
|
||||
@ -31,10 +31,14 @@ START_TEST(test_mem_one)
|
||||
#define SIZE1 16
|
||||
#define SIZE1_2 12
|
||||
#define SIZE2 16
|
||||
void *p1, *p2, *p3, *p4, *p5;
|
||||
void *p1, *p2;
|
||||
mem_size_t s1, s2;
|
||||
LWIP_UNUSED_ARG(_i);
|
||||
|
||||
#if LWIP_DNS
|
||||
fail("This test needs DNS turned off (as it mallocs on init)");
|
||||
#endif
|
||||
|
||||
fail_unless(lwip_stats.mem.used == 0);
|
||||
|
||||
p1 = mem_malloc(SIZE1);
|
||||
|
Loading…
Reference in New Issue
Block a user