aboutsummaryrefslogtreecommitdiff
path: root/src/platform
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-03 16:26:19 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-03 16:50:04 -0800
commitc2e396d5f9b0151b3564073e9f439fa492e735f6 (patch)
treeee699f2b76a9d0e6995a475cadc3812393fa08f7 /src/platform
parente7802b729a5b837df9bcac80b94196d015c2b29f (diff)
downloadnng-c2e396d5f9b0151b3564073e9f439fa492e735f6.tar.gz
nng-c2e396d5f9b0151b3564073e9f439fa492e735f6.tar.bz2
nng-c2e396d5f9b0151b3564073e9f439fa492e735f6.zip
Introduce NUTS_SKIP and use it in a few tests.
This lets us see that we are skipping tests due to lack of support, and makes it a little clearer to an observer.
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/udp_test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/platform/udp_test.c b/src/platform/udp_test.c
index b6b31c9b..7cafff1e 100644
--- a/src/platform/udp_test.c
+++ b/src/platform/udp_test.c
@@ -366,10 +366,10 @@ test_udp_multicast_send_recv(void)
nng_aio_free(aio2);
}
-#ifdef NNG_ENABLE_IPV6
void
test_udp_send_v6_from_v4(void)
{
+#ifdef NNG_ENABLE_IPV6
int rv;
nng_udp *u1;
nng_sockaddr sa = { 0 };
@@ -403,8 +403,10 @@ test_udp_send_v6_from_v4(void)
nng_aio_free(aio1);
nng_udp_close(u1);
+#else
+ NUTS_SKIP("IPv6 not enabled");
+#endif
}
-#endif // NNG_ENABLE_IPV6
NUTS_TESTS = {
{ "udp pair", test_udp_pair },
@@ -415,8 +417,6 @@ NUTS_TESTS = {
{ "udp duplicate bind", test_udp_duplicate_bind },
{ "udp multicast membership", test_udp_multicast_membership },
{ "udp multicast send recv", test_udp_multicast_send_recv },
-#ifdef NNG_ENABLE_IPV6
{ "udp send v6 from v4", test_udp_send_v6_from_v4 },
-#endif
{ NULL, NULL },
};