From 5485d6e371a23ef2408b165f1efed187a2af1c5b Mon Sep 17 00:00:00 2001 From: Rik van der Heijden Date: Tue, 11 Aug 2015 21:44:41 +0200 Subject: [PATCH] Check proxy return values in tests --- tests/test_proxy.cpp | 3 ++- tests/test_proxy_single_socket.cpp | 3 ++- tests/test_proxy_terminate.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_proxy.cpp b/tests/test_proxy.cpp index fe35b768..d3de0a1d 100644 --- a/tests/test_proxy.cpp +++ b/tests/test_proxy.cpp @@ -165,7 +165,8 @@ server_task (void *ctx) threads[thread_nbr] = zmq_threadstart (&server_worker, ctx); // Connect backend to frontend via a proxy - zmq_proxy_steerable (frontend, backend, NULL, control); + rc = zmq_proxy_steerable (frontend, backend, NULL, control); + assert (rc == 0); for (thread_nbr = 0; thread_nbr < QT_WORKERS; thread_nbr++) zmq_threadclose (threads[thread_nbr]); diff --git a/tests/test_proxy_single_socket.cpp b/tests/test_proxy_single_socket.cpp index bd63f7e3..41549f38 100644 --- a/tests/test_proxy_single_socket.cpp +++ b/tests/test_proxy_single_socket.cpp @@ -52,7 +52,8 @@ server_task (void *ctx) assert (rc == 0); // Use rep as both frontend and backend - zmq_proxy_steerable (rep, rep, NULL, control); + rc = zmq_proxy_steerable (rep, rep, NULL, control); + assert (rc == 0); rc = zmq_close (rep); assert (rc == 0); diff --git a/tests/test_proxy_terminate.cpp b/tests/test_proxy_terminate.cpp index 9f688fb6..18a0a8a6 100644 --- a/tests/test_proxy_terminate.cpp +++ b/tests/test_proxy_terminate.cpp @@ -61,7 +61,8 @@ server_task (void *ctx) assert (rc == 0); // Connect backend to frontend via a proxy - zmq_proxy_steerable (frontend, backend, NULL, control); + rc = zmq_proxy_steerable (frontend, backend, NULL, control); + assert (rc == 0); rc = zmq_close (frontend); assert (rc == 0);