From 457b0e707750480baa9feab70ef1b0fb7af5b519 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Wed, 28 Nov 2018 16:41:40 -0800 Subject: [PATCH 1/2] fix wrong use of constructor --- rclcpp/test/test_time_source.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rclcpp/test/test_time_source.cpp b/rclcpp/test/test_time_source.cpp index dbb4fd7..6a6c37b 100644 --- a/rclcpp/test/test_time_source.cpp +++ b/rclcpp/test/test_time_source.cpp @@ -348,14 +348,14 @@ TEST_F(TestTimeSource, parameter_activation) { EXPECT_TRUE(ros_clock->ros_time_is_active()); set_use_sim_time_parameter( - node, rclcpp::ParameterValue(rclcpp::ParameterType::PARAMETER_NOT_SET)); + node, rclcpp::ParameterValue()); EXPECT_TRUE(ros_clock->ros_time_is_active()); set_use_sim_time_parameter(node, rclcpp::ParameterValue(false)); EXPECT_FALSE(ros_clock->ros_time_is_active()); set_use_sim_time_parameter( - node, rclcpp::ParameterValue(rclcpp::ParameterType::PARAMETER_NOT_SET)); + node, rclcpp::ParameterValue()); EXPECT_FALSE(ros_clock->ros_time_is_active()); // If the use_sim_time parameter is not explicitly set to True, this clock's use of sim time From 03cbc1c8956e9c1fccc48da8a11a47e09b7b7563 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Wed, 28 Nov 2018 21:14:46 -0800 Subject: [PATCH 2/2] call shutdown in test --- rclcpp/test/test_time_source.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rclcpp/test/test_time_source.cpp b/rclcpp/test/test_time_source.cpp index 6a6c37b..54c0e69 100644 --- a/rclcpp/test/test_time_source.cpp +++ b/rclcpp/test/test_time_source.cpp @@ -37,6 +37,11 @@ protected: rclcpp::init(0, nullptr); } + static void TearDownTestCase() + { + rclcpp::shutdown(); + } + void SetUp() { node = std::make_shared("my_node");