2023-06-05 00:16:05 +01:00
|
|
|
/* SPDX-License-Identifier: MPL-2.0 */
|
2014-04-30 14:43:37 +02:00
|
|
|
|
|
|
|
#include "testutil.hpp"
|
2018-03-14 18:45:25 +01:00
|
|
|
#include "testutil_unity.hpp"
|
2014-04-30 14:43:37 +02:00
|
|
|
|
2019-03-24 12:51:28 -04:00
|
|
|
SETUP_TEARDOWN_TESTCONTEXT
|
2014-04-30 14:43:37 +02:00
|
|
|
|
2018-03-14 18:45:25 +01:00
|
|
|
void test_x ()
|
|
|
|
{
|
|
|
|
void *sock = test_context_socket (ZMQ_PUB);
|
2014-04-30 14:43:37 +02:00
|
|
|
|
2018-03-14 18:45:25 +01:00
|
|
|
TEST_ASSERT_SUCCESS_ERRNO (
|
|
|
|
zmq_connect (sock, "tcp://127.0.0.1:0;localhost:1234"));
|
|
|
|
TEST_ASSERT_SUCCESS_ERRNO (
|
|
|
|
zmq_connect (sock, "tcp://localhost:5555;localhost:1235"));
|
|
|
|
TEST_ASSERT_SUCCESS_ERRNO (
|
|
|
|
zmq_connect (sock, "tcp://lo:5555;localhost:1235"));
|
2014-04-30 14:43:37 +02:00
|
|
|
|
2018-03-14 18:45:25 +01:00
|
|
|
test_context_socket_close (sock);
|
|
|
|
}
|
2014-04-30 14:43:37 +02:00
|
|
|
|
2018-03-14 18:45:25 +01:00
|
|
|
int main (void)
|
|
|
|
{
|
|
|
|
setup_test_environment ();
|
2014-04-30 14:43:37 +02:00
|
|
|
|
2018-03-14 18:45:25 +01:00
|
|
|
UNITY_BEGIN ();
|
|
|
|
RUN_TEST (test_x);
|
|
|
|
return UNITY_END ();
|
2014-04-30 14:43:37 +02:00
|
|
|
}
|