#include "test_udp.h"
#include "lwip/udp.h"
#include "lwip/stats.h"
Go to the source code of this file.
◆ START_TEST()
START_TEST |
( |
test_udp_new_remove |
| ) |
|
Definition at line 42 of file test_udp.c.
43{
44 struct udp_pcb* pcb;
46
47 fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0);
48
49 pcb = udp_new();
50 fail_unless(pcb !=
NULL);
52 fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 1);
53 udp_remove(pcb);
54 fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0);
55 }
56}
#define LWIP_UNUSED_ARG(x)
◆ udp_remove_all()
Definition at line 12 of file test_udp.c.
13{
14 struct udp_pcb *pcb = udp_pcbs;
15 struct udp_pcb *pcb2;
16
18 pcb2 = pcb;
19 pcb = pcb->next;
20 udp_remove(pcb2);
21 }
22 fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0);
23}
Referenced by udp_setup(), and udp_teardown().
◆ udp_setup()
◆ udp_suite()
END_TEST Suite * udp_suite |
( |
void |
| ) |
|
Create the suite including all tests for this module
Definition at line 62 of file test_udp.c.
63{
65 test_udp_new_remove,
66 };
68}
static Suite * create_suite(const char *name, TFun *tests, size_t num_tests, SFun setup, SFun teardown)
static struct test_info tests[]
static void udp_setup(void)
static void udp_teardown(void)
Referenced by main().
◆ udp_teardown()