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
cdc298f5
Commit
cdc298f5
authored
Mar 16, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: bind_loopback_ipv4 not reusable
Solution: Moved bind_loopback_ipv4 to testutil_unity to allow for reuse
parent
8d0d4c76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
test_poller.cpp
tests/test_poller.cpp
+0
-7
testutil_unity.hpp
tests/testutil_unity.hpp
+7
-0
No files found.
tests/test_poller.cpp
View file @
cdc298f5
...
...
@@ -446,13 +446,6 @@ TEST_CASE_FUNC_PARAM (call_poller_wait_all_empty_without_timeout_fails,
TEST_CASE_FUNC_PARAM
(
call_poller_wait_all_empty_with_timeout_fails
,
test_with_empty_poller
)
void
bind_loopback_ipv4
(
void
*
socket
,
char
*
my_endpoint
,
size_t
len
)
{
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
socket
,
"tcp://127.0.0.1:*"
));
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_getsockopt
(
socket
,
ZMQ_LAST_ENDPOINT
,
my_endpoint
,
&
len
));
}
void
test_poll_basic
()
{
// Create few sockets
...
...
tests/testutil_unity.hpp
View file @
cdc298f5
...
...
@@ -191,3 +191,10 @@ void *test_context_socket_close (void *socket)
internal_manage_test_sockets
(
socket
,
false
);
return
socket
;
}
void
bind_loopback_ipv4
(
void
*
socket
,
char
*
my_endpoint
,
size_t
len
)
{
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_bind
(
socket
,
"tcp://127.0.0.1:*"
));
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_getsockopt
(
socket
,
ZMQ_LAST_ENDPOINT
,
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