aboutsummaryrefslogtreecommitdiff
path: root/tests/trantest.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2019-12-25 09:45:12 -0800
committerGarrett D'Amore <garrett@damore.org>2019-12-25 09:58:05 -0800
commit440ddf86b3b3b6be47943c5b6408d63b091f2c28 (patch)
tree1dc5a7ed1d8da3e6540f5c8b1f7c75df0a718496 /tests/trantest.h
parent1b71d116b8343d0d67bdb8c303cfecc2773fd0aa (diff)
downloadnng-440ddf86b3b3b6be47943c5b6408d63b091f2c28.tar.gz
nng-440ddf86b3b3b6be47943c5b6408d63b091f2c28.tar.bz2
nng-440ddf86b3b3b6be47943c5b6408d63b091f2c28.zip
fixes #1040 Convert rest of the protocols to new CMake infra
Diffstat (limited to 'tests/trantest.h')
-rw-r--r--tests/trantest.h36
1 files changed, 1 insertions, 35 deletions
diff --git a/tests/trantest.h b/tests/trantest.h
index 97fd3159..09b40049 100644
--- a/tests/trantest.h
+++ b/tests/trantest.h
@@ -1,5 +1,5 @@
//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -58,18 +58,6 @@ extern void trantest_test_all(const char *addr);
#ifndef NNG_TRANSPORT_ZEROTIER
#define nng_zt_register notransport
#endif
-#ifndef NNG_TRANSPORT_INPROC
-#define nng_inproc_register notransport
-#endif
-#ifndef NNG_TRANSPORT_IPC
-#define nng_ipc_register notransport
-#endif
-#ifndef NNG_TRANSPORT_TCP
-#define nng_tcp_register notransport
-#endif
-#ifndef NNG_TRANSPORT_TLS
-#define nng_tls_register notransport
-#endif
#ifndef NNG_TRANSPORT_WS
#define nng_ws_register notransport
#endif
@@ -91,18 +79,6 @@ notransport(void)
void
trantest_checktran(const char *url)
{
-#ifndef NNG_TRANSPORT_INPROC
- CHKTRAN(url, "inproc:");
-#endif
-#ifndef NNG_TRANSPORT_IPC
- CHKTRAN(url, "ipc:");
-#endif
-#ifndef NNG_TRANSPORT_TCP
- CHKTRAN(url, "tcp:");
-#endif
-#ifndef NNG_TRANSPORT_TLS
- CHKTRAN(url, "tls+tcp:");
-#endif
#ifndef NNG_TRANSPORT_WS
CHKTRAN(url, "ws:");
#endif
@@ -148,20 +124,14 @@ trantest_init(trantest *tt, const char *addr)
{
trantest_next_address(tt->addr, addr);
-#if defined(NNG_HAVE_REQ0) && defined(NNG_HAVE_REP0)
So(nng_req_open(&tt->reqsock) == 0);
So(nng_rep_open(&tt->repsock) == 0);
nng_url *url;
So(nng_url_parse(&url, tt->addr) == 0);
-#if defined(NNG_STATIC_LIB)
tt->tran = nni_tran_find(url);
So(tt->tran != NULL);
-#endif
nng_url_free(url);
-#else
- ConveySkip("Missing REQ or REP protocols");
-#endif
}
void
@@ -222,15 +192,11 @@ trantest_listen(trantest *tt, nng_listener *lp)
void
trantest_scheme(trantest *tt)
{
-#if NNG_STATIC_LIB
Convey("Scheme is correct", {
size_t l = strlen(tt->tran->tran_scheme);
So(strncmp(tt->addr, tt->tran->tran_scheme, l) == 0);
So(strncmp(tt->addr + l, "://", 3) == 0);
})
-#else
- (void) tt;
-#endif
}
void