Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
45681798
Unverified
Commit
45681798
authored
Mar 21, 2018
by
Luca Boccassi
Committed by
GitHub
Mar 21, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3011 from sigiesec/migrate-to-unity
Migrate test_reqrep_tcp to unity
parents
15b3dccf
84a3767d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
Makefile.am
Makefile.am
+2
-1
test_reqrep_tcp.cpp
tests/test_reqrep_tcp.cpp
+0
-0
testutil_unity.hpp
tests/testutil_unity.hpp
+14
-2
No files found.
Makefile.am
View file @
45681798
...
...
@@ -460,7 +460,8 @@ tests_test_reqrep_inproc_LDADD = src/libzmq.la
tests_test_reqrep_tcp_SOURCES
=
\
tests/test_reqrep_tcp.cpp
\
tests/testutil.hpp
tests_test_reqrep_tcp_LDADD
=
src/libzmq.la
tests_test_reqrep_tcp_LDADD
=
src/libzmq.la
${
UNITY_LIBS
}
tests_test_reqrep_tcp_CPPFLAGS
=
${
UNITY_CPPFLAGS
}
tests_test_hwm_SOURCES
=
tests/test_hwm.cpp tests/testutil_unity.hpp
tests_test_hwm_LDADD
=
src/libzmq.la
${
UNITY_LIBS
}
...
...
tests/test_reqrep_tcp.cpp
View file @
45681798
This diff is collapsed.
Click to expand it.
tests/testutil_unity.hpp
View file @
45681798
...
...
@@ -192,9 +192,21 @@ void *test_context_socket_close (void *socket)
return
socket
;
}
void
bind_loopback
_ipv4
(
void
*
socket
,
char
*
my_endpoint
,
size_t
len
)
void
bind_loopback
(
void
*
socket
,
int
ipv6
,
char
*
my_endpoint
,
size_t
len
)
{
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
socket
,
"tcp://127.0.0.1:*"
));
if
(
ipv6
&&
!
is_ipv6_available
())
{
TEST_IGNORE_MESSAGE
(
"ipv6 is not available"
);
}
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_setsockopt
(
socket
,
ZMQ_IPV6
,
&
ipv6
,
sizeof
(
int
)));
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
socket
,
ipv6
?
"tcp://[::1]:*"
:
"tcp://127.0.0.1:*"
));
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_getsockopt
(
socket
,
ZMQ_LAST_ENDPOINT
,
my_endpoint
,
&
len
));
}
void
bind_loopback_ipv4
(
void
*
socket
,
char
*
my_endpoint
,
size_t
len
)
{
bind_loopback
(
socket
,
false
,
my_endpoint
,
len
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment