mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-26 09:35:23 +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
|
#if !LWIP_STATS || !MEM_STATS
|
||||||
#error "This tests needs MEM-statistics enabled"
|
#error "This tests needs MEM-statistics enabled"
|
||||||
#endif
|
#endif
|
||||||
#if LWIP_SNMP || LWIP_DNS
|
#if LWIP_DNS
|
||||||
#error "This test needs SNMP and DNS turned off (as they malloc on init)"
|
/*#error "This test needs DNS turned off (as it mallocs on init)"*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Setups/teardown functions */
|
/* Setups/teardown functions */
|
||||||
@ -31,10 +31,14 @@ START_TEST(test_mem_one)
|
|||||||
#define SIZE1 16
|
#define SIZE1 16
|
||||||
#define SIZE1_2 12
|
#define SIZE1_2 12
|
||||||
#define SIZE2 16
|
#define SIZE2 16
|
||||||
void *p1, *p2, *p3, *p4, *p5;
|
void *p1, *p2;
|
||||||
mem_size_t s1, s2;
|
mem_size_t s1, s2;
|
||||||
LWIP_UNUSED_ARG(_i);
|
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);
|
fail_unless(lwip_stats.mem.used == 0);
|
||||||
|
|
||||||
p1 = mem_malloc(SIZE1);
|
p1 = mem_malloc(SIZE1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user