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
19c6aa5c
Commit
19c6aa5c
authored
Feb 05, 2019
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: monitor events are output as decimal in assertion messages
Solution: output as hex instead
parent
a86592f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
test_monitor.cpp
tests/test_monitor.cpp
+3
-3
testutil_monitoring.hpp
tests/testutil_monitoring.hpp
+1
-1
No files found.
tests/test_monitor.cpp
View file @
19c6aa5c
...
...
@@ -171,7 +171,7 @@ void test_monitor_versioned_basic (bind_function_t bind_function_,
event
=
get_monitor_event_v2
(
client_mon
,
NULL
,
&
client_local_address
,
&
client_remote_address
);
}
TEST_ASSERT_EQUAL
(
ZMQ_EVENT_CONNECTED
,
event
);
TEST_ASSERT_EQUAL
_HEX64
(
ZMQ_EVENT_CONNECTED
,
event
);
TEST_ASSERT_EQUAL_STRING
(
server_endpoint
,
client_remote_address
);
TEST_ASSERT_EQUAL_STRING_LEN
(
expected_prefix_
,
client_local_address
,
strlen
(
expected_prefix_
));
...
...
@@ -192,11 +192,11 @@ void test_monitor_versioned_basic (bind_function_t bind_function_,
event
=
get_monitor_event_v2
(
server_mon
,
NULL
,
NULL
,
NULL
);
// Sometimes the server sees the client closing before it gets closed.
if
(
event
!=
ZMQ_EVENT_DISCONNECTED
)
{
TEST_ASSERT_EQUAL_
INT
(
ZMQ_EVENT_CLOSED
,
event
);
TEST_ASSERT_EQUAL_
HEX64
(
ZMQ_EVENT_CLOSED
,
event
);
event
=
get_monitor_event_v2
(
server_mon
,
NULL
,
NULL
,
NULL
);
}
if
(
event
!=
ZMQ_EVENT_DISCONNECTED
)
{
TEST_ASSERT_EQUAL_
INT
(
ZMQ_EVENT_MONITOR_STOPPED
,
event
);
TEST_ASSERT_EQUAL_
HEX64
(
ZMQ_EVENT_MONITOR_STOPPED
,
event
);
}
free
(
client_local_address
);
free
(
client_remote_address
);
...
...
tests/testutil_monitoring.hpp
View file @
19c6aa5c
...
...
@@ -306,7 +306,7 @@ void expect_monitor_event_v2 (void *monitor_,
expected_remote_address_
?
&
remote_address
:
NULL
);
bool
failed
=
false
;
if
(
event
!=
expected_event_
)
{
fprintf
(
stderr
,
"Expected monitor event %ll
d, but received %lld
\n
"
,
fprintf
(
stderr
,
"Expected monitor event %ll
x, but received %llx
\n
"
,
(
long
long
)
expected_event_
,
(
long
long
)
event
);
failed
=
true
;
}
...
...
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