1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/lwip_sock_udp: fix NDEBUG compile problem

This commit is contained in:
Gunar Schorcht 2020-02-25 09:28:59 +01:00
parent e4909375b0
commit ad4f1993b2
2 changed files with 347 additions and 345 deletions

File diff suppressed because it is too large Load Diff

View File

@ -24,6 +24,7 @@
#include "net/sock.h"
#include "net/udp.h"
#include "sched.h"
#include "test_utils/expect.h"
#include "xtimer.h"
#include "lwip.h"
@ -76,7 +77,7 @@ static int _get_addr(netdev_t *dev, void *value, size_t max_len)
static const uint8_t _local_ip[] = _TEST_ADDR6_LOCAL;
(void)dev;
assert(max_len >= ETHERNET_ADDR_LEN);
expect(max_len >= ETHERNET_ADDR_LEN);
return l2util_ipv6_iid_to_addr(NETDEV_TYPE_ETHERNET,
(eui64_t *)&_local_ip[8],
value);
@ -157,7 +158,7 @@ void _net_init(void)
netdev_test_set_recv_cb(&netdev, _netdev_recv);
netdev_test_set_isr_cb(&netdev, _netdev_isr);
/* netdev needs to be set-up */
assert(netdev.netdev.driver);
expect(netdev.netdev.driver);
#if LWIP_IPV4
ip4_addr_t local4, mask4, gw4;
local4.addr = _TEST_ADDR4_LOCAL;
@ -201,7 +202,7 @@ void _prepare_send_checks(void)
netdev_test_set_send_cb(&netdev, _netdev_send);
#if LWIP_ARP
const ip4_addr_t remote4 = { .addr = _TEST_ADDR4_REMOTE };
assert(ERR_OK == etharp_add_static_entry(&remote4, (struct eth_addr *)mac));
expect(ERR_OK == etharp_add_static_entry(&remote4, (struct eth_addr *)mac));
#endif
#if LWIP_IPV6
memset(destination_cache, 0,