test_reqrep_inproc.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MPL-2.0 */
2 
3 #include "testutil.hpp"
4 #include "testutil_unity.hpp"
5 
7 
9 {
10  void *sb = test_context_socket (ZMQ_REP);
11  TEST_ASSERT_SUCCESS_ERRNO (zmq_bind (sb, "inproc://a"));
12 
13  void *sc = test_context_socket (ZMQ_REQ);
14  TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (sc, "inproc://a"));
15 
16  bounce (sb, sc);
17 
20 }
21 
22 int main ()
23 {
25 
26  UNITY_BEGIN ();
28  return UNITY_END ();
29 }
bounce
static void bounce(void *socket_)
Definition: test_req_relaxed.cpp:50
UNITY_END
return UNITY_END()
RUN_TEST
#define RUN_TEST(func)
Definition: unity_internals.h:615
SETUP_TEARDOWN_TESTCONTEXT
#define SETUP_TEARDOWN_TESTCONTEXT
Definition: testutil_unity.hpp:172
ZMQ_REQ
#define ZMQ_REQ
Definition: zmq.h:261
zmq_connect
ZMQ_EXPORT int zmq_connect(void *s_, const char *addr_)
Definition: zmq.cpp:307
testutil_unity.hpp
sb
void * sb
Definition: test_channel.cpp:8
testutil.hpp
ZMQ_REP
#define ZMQ_REP
Definition: zmq.h:262
zmq_bind
ZMQ_EXPORT int zmq_bind(void *s_, const char *addr_)
Definition: zmq.cpp:299
sc
void * sc
Definition: test_channel.cpp:9
test_context_socket
void * test_context_socket(int type_)
Definition: testutil_unity.cpp:200
main
int main()
Definition: test_reqrep_inproc.cpp:22
test_roundtrip
SETUP_TEARDOWN_TESTCONTEXT void test_roundtrip()
Definition: test_reqrep_inproc.cpp:8
setup_test_environment
void setup_test_environment(int timeout_seconds_)
Definition: testutil.cpp:201
UNITY_BEGIN
UNITY_BEGIN()
test_context_socket_close
void * test_context_socket_close(void *socket_)
Definition: testutil_unity.cpp:208
TEST_ASSERT_SUCCESS_ERRNO
#define TEST_ASSERT_SUCCESS_ERRNO(expr)
Definition: proxy_thr.cpp:47


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:59