4 #include "lwip/stats.h"
6 #if !LWIP_STATS || !UDP_STATS || !MEMP_STATS
7 #error "This tests needs UDP- and MEMP-statistics enabled"
10 /* Helper functions */
14 struct udp_pcb
*pcb
= udp_pcbs
;
22 fail_unless(lwip_stats
.memp
[MEMP_UDP_PCB
].used
== 0);
25 /* Setups/teardown functions */
42 START_TEST(test_udp_new_remove
)
47 fail_unless(lwip_stats
.memp
[MEMP_UDP_PCB
].used
== 0);
50 fail_unless(pcb
!= NULL
);
52 fail_unless(lwip_stats
.memp
[MEMP_UDP_PCB
].used
== 1);
54 fail_unless(lwip_stats
.memp
[MEMP_UDP_PCB
].used
== 0);
60 /** Create the suite including all tests for this module */
67 return create_suite("UDP", tests
, sizeof(tests
)/sizeof(TFun
), udp_setup
, udp_teardown
);