Skip to content

Commit 27b2d0e

Browse files
Janosch MachowinskiJanosch Machowinski
Janosch Machowinski
authored and
Janosch Machowinski
committed
chore: style and warning fixes
Signed-off-by: Janosch Machowinski <[email protected]>
1 parent ba78768 commit 27b2d0e

File tree

1 file changed

+4
-28
lines changed

1 file changed

+4
-28
lines changed

rclcpp/test/rclcpp/executors/test_executors.cpp

+4-28
Original file line numberDiff line numberDiff line change
@@ -918,9 +918,6 @@ TYPED_TEST(TestExecutors, dropSomeTimer)
918918

919919
const auto cur_time = std::chrono::steady_clock::now();
920920
ASSERT_LT(cur_time, max_end_time);
921-
if(cur_time > max_end_time) {
922-
return;
923-
}
924921
}
925922

926923
// delete timer 2. Note, the executor uses an unordered map internally, to order
@@ -938,9 +935,6 @@ TYPED_TEST(TestExecutors, dropSomeTimer)
938935

939936
const auto cur_time = std::chrono::steady_clock::now();
940937
ASSERT_LT(cur_time, max_end_time);
941-
if(cur_time > max_end_time) {
942-
return;
943-
}
944938
}
945939

946940
ASSERT_TRUE(timer1_works || timer2_works);
@@ -975,9 +969,6 @@ TYPED_TEST(TestExecutors, dropSomeNodeWithTimer)
975969

976970
const auto cur_time = std::chrono::steady_clock::now();
977971
ASSERT_LT(cur_time, max_end_time);
978-
if(cur_time > max_end_time) {
979-
return;
980-
}
981972
}
982973

983974
// delete node 1.
@@ -991,9 +982,6 @@ TYPED_TEST(TestExecutors, dropSomeNodeWithTimer)
991982

992983
const auto cur_time = std::chrono::steady_clock::now();
993984
ASSERT_LT(cur_time, max_end_time);
994-
if(cur_time > max_end_time) {
995-
return;
996-
}
997985
}
998986

999987
ASSERT_TRUE(timer2_works);
@@ -1010,11 +998,11 @@ TYPED_TEST(TestExecutors, dropSomeSubscription)
1010998
bool sub2_works = false;
1011999

10121000
auto sub1 = node->create_subscription<test_msgs::msg::Empty>("/test_drop", 10,
1013-
[&sub1_works](const test_msgs::msg::Empty & msg) {
1001+
[&sub1_works](const test_msgs::msg::Empty &) {
10141002
sub1_works = true;
10151003
});
10161004
auto sub2 = node->create_subscription<test_msgs::msg::Empty>("/test_drop", 10,
1017-
[&sub2_works](const test_msgs::msg::Empty & msg) {
1005+
[&sub2_works](const test_msgs::msg::Empty &) {
10181006
sub2_works = true;
10191007
});
10201008

@@ -1032,9 +1020,6 @@ TYPED_TEST(TestExecutors, dropSomeSubscription)
10321020

10331021
const auto cur_time = std::chrono::steady_clock::now();
10341022
ASSERT_LT(cur_time, max_end_time);
1035-
if(cur_time > max_end_time) {
1036-
return;
1037-
}
10381023
}
10391024

10401025
// delete subscription 2. Note, the executor uses an unordered map internally, to order
@@ -1054,9 +1039,6 @@ TYPED_TEST(TestExecutors, dropSomeSubscription)
10541039

10551040
const auto cur_time = std::chrono::steady_clock::now();
10561041
ASSERT_LT(cur_time, max_end_time);
1057-
if(cur_time > max_end_time) {
1058-
return;
1059-
}
10601042
}
10611043

10621044
ASSERT_TRUE(sub1_works || sub2_works);
@@ -1075,11 +1057,11 @@ TYPED_TEST(TestExecutors, dropSomeNodesWithSubscription)
10751057
bool sub2_works = false;
10761058

10771059
auto sub1 = node1->create_subscription<test_msgs::msg::Empty>("/test_drop", 10,
1078-
[&sub1_works](const test_msgs::msg::Empty & msg) {
1060+
[&sub1_works](const test_msgs::msg::Empty &) {
10791061
sub1_works = true;
10801062
});
10811063
auto sub2 = node2->create_subscription<test_msgs::msg::Empty>("/test_drop", 10,
1082-
[&sub2_works](const test_msgs::msg::Empty & msg) {
1064+
[&sub2_works](const test_msgs::msg::Empty &) {
10831065
sub2_works = true;
10841066
});
10851067

@@ -1099,9 +1081,6 @@ TYPED_TEST(TestExecutors, dropSomeNodesWithSubscription)
10991081

11001082
const auto cur_time = std::chrono::steady_clock::now();
11011083
ASSERT_LT(cur_time, max_end_time);
1102-
if(cur_time > max_end_time) {
1103-
return;
1104-
}
11051084
}
11061085

11071086
// delete node 2.
@@ -1117,9 +1096,6 @@ TYPED_TEST(TestExecutors, dropSomeNodesWithSubscription)
11171096

11181097
const auto cur_time = std::chrono::steady_clock::now();
11191098
ASSERT_LT(cur_time, max_end_time);
1120-
if(cur_time > max_end_time) {
1121-
return;
1122-
}
11231099
}
11241100

11251101
ASSERT_TRUE(sub1_works);

0 commit comments

Comments
 (0)