Skip to content

Commit 20e2a43

Browse files
hidmicahcorde
authored andcommitted
Complete publisher/subscription QoS query API test coverage. (#120)
Signed-off-by: Michel Hidalgo <[email protected]>
1 parent 8a7bbed commit 20e2a43

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test_rmw_implementation/test/test_publisher.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,13 @@ TEST_F(CLASSNAME(TestPublisherUse, RMW_IMPLEMENTATION), get_actual_qos_with_bad_
244244
ret = rmw_publisher_get_actual_qos(pub, nullptr);
245245
EXPECT_EQ(RMW_RET_INVALID_ARGUMENT, ret);
246246
rmw_reset_error();
247+
248+
const char * implementation_identifier = pub->implementation_identifier;
249+
pub->implementation_identifier = "not-an-rmw-implementation-identifier";
250+
ret = rmw_publisher_get_actual_qos(pub, &actual_qos_profile);
251+
pub->implementation_identifier = implementation_identifier;
252+
EXPECT_EQ(RMW_RET_INCORRECT_RMW_IMPLEMENTATION, ret);
253+
rmw_reset_error();
247254
}
248255

249256
TEST_F(CLASSNAME(TestPublisherUse, RMW_IMPLEMENTATION), get_actual_qos) {

0 commit comments

Comments
 (0)