From 59ee3628d5db511ce5527ce4ddbf126e929d7da8 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 15 May 2018 19:23:05 -0700 Subject: fixes #430 Unable to build in MSYS + Win-builds fixes #438 Consider dropping AI_V4MAPPED --- tests/resolv.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'tests/resolv.c') diff --git a/tests/resolv.c b/tests/resolv.c index dfc599c0..1d502eec 100644 --- a/tests/resolv.c +++ b/tests/resolv.c @@ -147,37 +147,15 @@ TestMain("Resolver", { nng_aio_free(aio); }); - Convey("TCP Name service resolves", { + Convey("Name service names not supported", { nng_aio * aio; - const char * str; nng_sockaddr sa; So(nng_aio_alloc(&aio, NULL, NULL) == 0); nng_aio_set_input(aio, 0, &sa); nni_plat_tcp_resolv("8.8.4.4", "http", NNG_AF_INET, 1, aio); nng_aio_wait(aio); - So(nng_aio_result(aio) == 0); - So(sa.s_in.sa_family == NNG_AF_INET); - So(sa.s_in.sa_port == ntohs(80)); - str = ip4tostr(&sa.s_in.sa_addr); - So(strcmp(str, "8.8.4.4") == 0); - nng_aio_free(aio); - }); - - Convey("UDP Name service resolves", { - nng_aio * aio; - const char * str; - nng_sockaddr sa; - - So(nng_aio_alloc(&aio, NULL, NULL) == 0); - nng_aio_set_input(aio, 0, &sa); - nni_plat_udp_resolv("8.8.4.4", "tftp", NNG_AF_INET, 1, aio); - nng_aio_wait(aio); - So(nng_aio_result(aio) == 0); - So(sa.s_in.sa_family == NNG_AF_INET); - So(sa.s_in.sa_port == ntohs(69)); - str = ip4tostr(&sa.s_in.sa_addr); - So(strcmp(str, "8.8.4.4") == 0); + So(nng_aio_result(aio) == NNG_EADDRINVAL); nng_aio_free(aio); }); -- cgit v1.2.3-70-g09d2