test_rebind_ipc.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 {
11  make_random_ipc_endpoint (my_endpoint);
12 
13  void *sb0 = test_context_socket (ZMQ_PUSH);
14  void *sb1 = test_context_socket (ZMQ_PUSH);
15 
17 
20 
21  send_string_expect_success (sb0, "42", 0);
22  recv_string_expect_success (sc, "42", 0);
23 
25 
27 
28  send_string_expect_success (sb1, "42", 0);
29  recv_string_expect_success (sc, "42", 0);
30 
33 }
34 
35 int main ()
36 {
38 
39  UNITY_BEGIN ();
41  return UNITY_END ();
42 }
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_connect
ZMQ_EXPORT int zmq_connect(void *s_, const char *addr_)
Definition: zmq.cpp:307
testutil_unity.hpp
test_rebind_ipc
SETUP_TEARDOWN_TESTCONTEXT void test_rebind_ipc()
Definition: test_rebind_ipc.cpp:8
ZMQ_PUSH
#define ZMQ_PUSH
Definition: zmq.h:266
testutil.hpp
my_endpoint
char my_endpoint[MAX_SOCKET_STRING]
Definition: test_security_curve.cpp:31
MAX_SOCKET_STRING
#define MAX_SOCKET_STRING
Definition: libzmq/tests/testutil.hpp:35
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_rebind_ipc.cpp:35
send_string_expect_success
void send_string_expect_success(void *socket_, const char *str_, int flags_)
Definition: testutil_unity.cpp:94
recv_string_expect_success
void recv_string_expect_success(void *socket_, const char *str_, int flags_)
Definition: testutil_unity.cpp:101
setup_test_environment
void setup_test_environment(int timeout_seconds_)
Definition: testutil.cpp:201
UNITY_BEGIN
UNITY_BEGIN()
ZMQ_PULL
#define ZMQ_PULL
Definition: zmq.h:265
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