ext/zeromq/tests/test_reqrep_tcp.cpp in rbczmq-1.7.1 vs ext/zeromq/tests/test_reqrep_tcp.cpp in rbczmq-1.7.2

- old
+ new

@@ -1,9 +1,7 @@ /* - Copyright (c) 2010-2011 250bpm s.r.o. - Copyright (c) 2011 iMatix Corporation - Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file + Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -17,18 +15,16 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <stdio.h> #include "testutil.hpp" int main (void) { - fprintf (stderr, "test_reqrep_tcp running...\n"); - - void *ctx = zmq_init (1); + setup_test_environment(); + void *ctx = zmq_ctx_new (); assert (ctx); void *sb = zmq_socket (ctx, ZMQ_REP); assert (sb); int rc = zmq_bind (sb, "tcp://127.0.0.1:5560"); @@ -45,10 +41,10 @@ assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); - rc = zmq_term (ctx); + rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; }