summaryrefslogtreecommitdiff
path: root/tests/test_pair_inproc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_pair_inproc.cpp')
-rw-r--r--tests/test_pair_inproc.cpp30
1 files changed, 25 insertions, 5 deletions
diff --git a/tests/test_pair_inproc.cpp b/tests/test_pair_inproc.cpp
index 5736674..17c37e0 100644
--- a/tests/test_pair_inproc.cpp
+++ b/tests/test_pair_inproc.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 = "inproc://tester" ;
- basic_tests (transport, ZMQ_PAIR, ZMQ_PAIR);
+ void *ctx = zmq_init (1);
+ assert (ctx);
+
+ void *sb = zmq_socket (ctx, ZMQ_PAIR);
+ assert (sb);
+ int rc = zmq_bind (sb, "inproc://a");
+ assert (rc == 0);
+
+ void *sc = zmq_socket (ctx, ZMQ_PAIR);
+ assert (sc);
+ rc = zmq_connect (sc, "inproc://a");
+ 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 ;
}