diff options
Diffstat (limited to 'tests/test_reqrep_ipc.cpp')
-rw-r--r-- | tests/test_reqrep_ipc.cpp | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/tests/test_reqrep_ipc.cpp b/tests/test_reqrep_ipc.cpp index 4134b1c..af15998 100644 --- a/tests/test_reqrep_ipc.cpp +++ b/tests/test_reqrep_ipc.cpp @@ -18,14 +18,34 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <assert.h> #include "testutil.hpp" -using namespace std; -using namespace zmqtestutil; - int main (int argc, char *argv []) { - const char *transport = "ipc:///tmp/tester" ; - basic_tests (transport, ZMQ_REQ, ZMQ_REP); + void *ctx = zmq_init (1); + assert (ctx); + + void *sb = zmq_socket (ctx, ZMQ_REP); + assert (sb); + int rc = zmq_bind (sb, "ipc:///tmp/tester"); + assert (rc == 0); + + void *sc = zmq_socket (ctx, ZMQ_REQ); + assert (sc); + rc = zmq_connect (sc, "ipc:///tmp/tester"); + assert (rc == 0); + + bounce (sb, sc); + + rc = zmq_close (sc); + assert (rc == 0); + + rc = zmq_close (sb); + assert (rc == 0); + + rc = zmq_term (ctx); + assert (rc == 0); + return 0 ; } |