From 8d723fee3d5ce50886dd36687dcbe3538710ed28 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 17 Sep 2016 18:46:21 +0100 Subject: [PATCH] Problem: test_reqrep_tcp is too limited Solution: refactor it to allow for multiple functionalities to be tested --- tests/test_reqrep_tcp.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test_reqrep_tcp.cpp b/tests/test_reqrep_tcp.cpp index c777f69e..3bbb579c 100644 --- a/tests/test_reqrep_tcp.cpp +++ b/tests/test_reqrep_tcp.cpp @@ -29,9 +29,8 @@ #include "testutil.hpp" -int main (void) +void test_single_connect_ipv4 (void) { - setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); @@ -55,6 +54,13 @@ int main (void) rc = zmq_ctx_term (ctx); assert (rc == 0); +} + +int main (void) +{ + setup_test_environment (); + + test_single_connect_ipv4 (); return 0 ; }