diff --git a/rclcpp/test/rclcpp/test_node.cpp b/rclcpp/test/rclcpp/test_node.cpp index b3e1569d6f..fe89fbcc37 100644 --- a/rclcpp/test/rclcpp/test_node.cpp +++ b/rclcpp/test/rclcpp/test_node.cpp @@ -2607,7 +2607,7 @@ TEST_F(TestNode, declare_parameter_allowed_simple_types_function_templates) { node->declare_parameter(name2, 1234); node->declare_parameter(name3, 12340); node->declare_parameter(name4, static_cast(12.34)); - node->declare_parameter(name5, 12.34); // called float64 in ros2 design parameters page + node->declare_parameter(name5, 12.34); // called float64 in ros2 design parameters page node->declare_parameter(name6, "test string"); auto str = "test param"; node->declare_parameter(name7, str); @@ -2644,7 +2644,7 @@ TEST_F(TestNode, declare_parameter_allowed_simple_types_function_templates) { node->declare_parameter(name2, 4321); node->declare_parameter(name3, 43210); node->declare_parameter(name4, static_cast(43.21)); - node->declare_parameter(name5, 12.34); // called float64 in ros2 design parameters page + node->declare_parameter(name5, 12.34); // called float64 in ros2 design parameters page node->declare_parameter(name6, "test string"); auto str = "test param"; node->declare_parameter(name7, str); @@ -2681,9 +2681,15 @@ TEST_F(TestNode, declare_parameter_allowed_array_types_function_templates) { node->declare_parameter>(name2, bool_arr); node->declare_parameter>(name3, std::vector{1234, 2345}); node->declare_parameter>(name4, std::vector{12340, 9876}); - node->declare_parameter>(name5, std::vector{static_cast(12.34), static_cast(98.78)}); - node->declare_parameter>(name6, std::vector{12.34, 55.66}); // called float64 in ros2 design parameters page - node->declare_parameter>(name7, std::vector{"test string", "another test str"}); + node->declare_parameter>( + name5, std::vector{static_cast(12.34), + static_cast(98.78)}); + node->declare_parameter>( + name6, + std::vector{12.34, 55.66}); // called float64 in ros2 design parameters page + node->declare_parameter>( + name7, std::vector{"test string", + "another test str"}); EXPECT_TRUE(node->has_parameter(name1)); EXPECT_TRUE(node->has_parameter(name2)); @@ -2718,9 +2724,15 @@ TEST_F(TestNode, declare_parameter_allowed_array_types_function_templates) { node->declare_parameter>(name2, std::vector{true, false, true}); node->declare_parameter>(name3, std::vector{22, 33, 55, 77}); node->declare_parameter>(name4, std::vector{456, 765}); - node->declare_parameter>(name5, std::vector{static_cast(99.11), static_cast(11.99)}); - node->declare_parameter>(name6, std::vector{12.21, 55.55, 98.89}); // called float64 in ros2 design parameters page - node->declare_parameter>(name7, std::vector{"ros2", "colcon", "ignition"}); + node->declare_parameter>( + name5, std::vector{static_cast(99.11), + static_cast(11.99)}); + node->declare_parameter>( + name6, + std::vector{12.21, 55.55, 98.89}); // called float64 in ros2 design parameters page + node->declare_parameter>( + name7, std::vector{"ros2", + "colcon", "ignition"}); std::vector expected = { {name1, std::vector{0xD, 0xE, 0xA, 0xD}},