From fbe44b15407bf605c22b43d925de0a3e2b2baa9f Mon Sep 17 00:00:00 2001 From: Michel Hidalgo Date: Mon, 7 Sep 2020 12:24:34 -0300 Subject: [PATCH] Complete publisher/subscription QoS query API test coverage. (#120) Signed-off-by: Michel Hidalgo --- test_rmw_implementation/test/test_publisher.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test_rmw_implementation/test/test_publisher.cpp b/test_rmw_implementation/test/test_publisher.cpp index 20f5f89c..60c31573 100644 --- a/test_rmw_implementation/test/test_publisher.cpp +++ b/test_rmw_implementation/test/test_publisher.cpp @@ -244,6 +244,13 @@ TEST_F(CLASSNAME(TestPublisherUse, RMW_IMPLEMENTATION), get_actual_qos_with_bad_ ret = rmw_publisher_get_actual_qos(pub, nullptr); EXPECT_EQ(RMW_RET_INVALID_ARGUMENT, ret); rmw_reset_error(); + + const char * implementation_identifier = pub->implementation_identifier; + pub->implementation_identifier = "not-an-rmw-implementation-identifier"; + ret = rmw_publisher_get_actual_qos(pub, &actual_qos_profile); + pub->implementation_identifier = implementation_identifier; + EXPECT_EQ(RMW_RET_INCORRECT_RMW_IMPLEMENTATION, ret); + rmw_reset_error(); } TEST_F(CLASSNAME(TestPublisherUse, RMW_IMPLEMENTATION), get_actual_qos) {