aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/trantest.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/trantest.h b/tests/trantest.h
index fb5392a5..3bc47e8d 100644
--- a/tests/trantest.h
+++ b/tests/trantest.h
@@ -78,6 +78,19 @@ trantest_duplicate_listen(trantest *tt)
}
void
+trantest_listen_accept(trantest *tt)
+{
+ Convey("Listen and accept" ,{
+ nng_endpoint *ep;
+ So(nng_listen(tt->repsock, tt->addr, &ep, NNG_FLAG_SYNCH) == 0);
+ So(ep != NULL);
+
+ So(nng_dial(tt->reqsock, tt->addr, &ep, NNG_FLAG_SYNCH) == 0);
+ So(ep != NULL);
+ })
+}
+
+void
trantest_test_all(const char *addr)
{
trantest tt;
@@ -92,5 +105,6 @@ trantest_test_all(const char *addr)
trantest_scheme(&tt);
trantest_conn_refused(&tt);
trantest_duplicate_listen(&tt);
+ trantest_listen_accept(&tt);
})
}