30
30
31
31
#include " test_msgs/msg/basic_types.hpp"
32
32
33
- #ifdef RMW_IMPLEMENTATION
34
- # define CLASSNAME_ (NAME, SUFFIX ) NAME ## __ ## SUFFIX
35
- # define CLASSNAME (NAME, SUFFIX ) CLASSNAME_(NAME, SUFFIX)
36
- #else
37
- # define CLASSNAME (NAME, SUFFIX ) NAME
38
- #endif
39
-
40
- class CLASSNAME (TestContentFilterSubscription, RMW_IMPLEMENTATION) : public ::testing::Test
33
+ class TestContentFilterSubscription : public ::testing::Test
41
34
{
42
35
public:
43
36
static void SetUpTestCase ()
@@ -113,7 +106,8 @@ bool operator==(const test_msgs::msg::BasicTypes & m1, const test_msgs::msg::Bas
113
106
m1.uint64_value == m2.uint64_value ;
114
107
}
115
108
116
- TEST_F (CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), is_cft_enabled) {
109
+ TEST_F (TestContentFilterSubscription, is_cft_enabled)
110
+ {
117
111
{
118
112
auto mock = mocking_utils::patch_and_return (
119
113
" lib:rclcpp" , rcl_subscription_is_cft_enabled, false );
@@ -127,7 +121,8 @@ TEST_F(CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), is_cft_enab
127
121
}
128
122
}
129
123
130
- TEST_F (CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), get_content_filter_error) {
124
+ TEST_F (TestContentFilterSubscription, get_content_filter_error)
125
+ {
131
126
auto mock = mocking_utils::patch_and_return (
132
127
" lib:rclcpp" , rcl_subscription_get_content_filter, RCL_RET_ERROR);
133
128
@@ -137,7 +132,8 @@ TEST_F(CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), get_content
137
132
rclcpp::exceptions::RCLError);
138
133
}
139
134
140
- TEST_F (CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), set_content_filter_error) {
135
+ TEST_F (TestContentFilterSubscription, set_content_filter_error)
136
+ {
141
137
auto mock = mocking_utils::patch_and_return (
142
138
" lib:rclcpp" , rcl_subscription_set_content_filter, RCL_RET_ERROR);
143
139
@@ -148,7 +144,8 @@ TEST_F(CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), set_content
148
144
rclcpp::exceptions::RCLError);
149
145
}
150
146
151
- TEST_F (CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), get_content_filter) {
147
+ TEST_F (TestContentFilterSubscription, get_content_filter)
148
+ {
152
149
rclcpp::ContentFilterOptions options;
153
150
154
151
if (sub->is_cft_enabled ()) {
@@ -164,7 +161,8 @@ TEST_F(CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), get_content
164
161
}
165
162
}
166
163
167
- TEST_F (CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), set_content_filter) {
164
+ TEST_F (TestContentFilterSubscription, set_content_filter)
165
+ {
168
166
if (sub->is_cft_enabled ()) {
169
167
EXPECT_NO_THROW (
170
168
sub->set_content_filter (filter_expression_init, expression_parameters_2));
@@ -175,7 +173,8 @@ TEST_F(CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), set_content
175
173
}
176
174
}
177
175
178
- TEST_F (CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), content_filter_get_begin) {
176
+ TEST_F (TestContentFilterSubscription, content_filter_get_begin)
177
+ {
179
178
using namespace std ::chrono_literals;
180
179
{
181
180
test_msgs::msg::BasicTypes msg;
@@ -217,7 +216,8 @@ TEST_F(CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), content_fil
217
216
}
218
217
}
219
218
220
- TEST_F (CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), content_filter_get_later) {
219
+ TEST_F (TestContentFilterSubscription, content_filter_get_later)
220
+ {
221
221
using namespace std ::chrono_literals;
222
222
{
223
223
test_msgs::msg::BasicTypes msg;
@@ -264,7 +264,8 @@ TEST_F(CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), content_fil
264
264
}
265
265
}
266
266
267
- TEST_F (CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), content_filter_reset) {
267
+ TEST_F (TestContentFilterSubscription, content_filter_reset)
268
+ {
268
269
using namespace std ::chrono_literals;
269
270
{
270
271
test_msgs::msg::BasicTypes msg;
@@ -311,11 +312,8 @@ TEST_F(CLASSNAME(TestContentFilterSubscription, RMW_IMPLEMENTATION), content_fil
311
312
}
312
313
}
313
314
314
- TEST_F (
315
- CLASSNAME (
316
- TestContentFilterSubscription,
317
- RMW_IMPLEMENTATION), create_two_content_filters_with_same_topic_name_and_destroy) {
318
-
315
+ TEST_F (TestContentFilterSubscription, create_two_content_filters_with_same_topic_name_and_destroy)
316
+ {
319
317
// Create another content filter
320
318
auto options = rclcpp::SubscriptionOptions ();
321
319
0 commit comments