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
57ef8e2e
Commit
57ef8e2e
authored
May 23, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: custom test ignore
Solution: use unity mechanism for ignoring with message
parent
2bdf86d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
test_radio_dish.cpp
tests/test_radio_dish.cpp
+16
-11
No files found.
tests/test_radio_dish.cpp
View file @
57ef8e2e
...
...
@@ -421,8 +421,18 @@ out:
return
success
;
}
static
void
ignore_if_unavailable
(
int
ipv6_
)
{
if
(
ipv6_
&&
!
is_ipv6_available
())
TEST_IGNORE_MESSAGE
(
"No IPV6 available"
);
if
(
!
is_multicast_available
(
ipv6_
))
TEST_IGNORE_MESSAGE
(
"No multicast available"
);
}
static
void
test_radio_dish_mcast
(
int
ipv6_
)
{
ignore_if_unavailable
(
ipv6_
);
void
*
radio
=
test_context_socket
(
ZMQ_RADIO
);
void
*
dish
=
test_context_socket
(
ZMQ_DISH
);
...
...
@@ -450,6 +460,8 @@ MAKE_TEST_V4V6 (test_radio_dish_mcast)
static
void
test_radio_dish_no_loop
(
int
ipv6_
)
{
ignore_if_unavailable
(
ipv6_
);
void
*
radio
=
test_context_socket
(
ZMQ_RADIO
);
void
*
dish
=
test_context_socket
(
ZMQ_DISH
);
...
...
@@ -501,18 +513,11 @@ int main (void)
RUN_TEST
(
test_radio_dish_udp_ipv4
);
RUN_TEST
(
test_radio_dish_udp_ipv6
);
bool
ipv4_mcast
=
is_multicast_available
(
false
);
bool
ipv6_mcast
=
is_ipv6_available
()
&&
is_multicast_available
(
true
);
if
(
ipv4_mcast
)
{
RUN_TEST
(
test_radio_dish_mcast_ipv4
);
RUN_TEST
(
test_radio_dish_no_loop_ipv4
);
}
RUN_TEST
(
test_radio_dish_mcast_ipv4
);
RUN_TEST
(
test_radio_dish_no_loop_ipv4
);
if
(
ipv6_mcast
)
{
RUN_TEST
(
test_radio_dish_mcast_ipv6
);
RUN_TEST
(
test_radio_dish_no_loop_ipv6
);
}
RUN_TEST
(
test_radio_dish_mcast_ipv6
);
RUN_TEST
(
test_radio_dish_no_loop_ipv6
);
return
UNITY_END
();
}
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