Skip to content

Commit

Permalink
Add unit test to chcek if destructor works
Browse files Browse the repository at this point in the history
  • Loading branch information
Zygfryd Wieszok committed Apr 15, 2022
1 parent 933609a commit 5326e5a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tf2_ros/test/test_transform_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ TEST(tf2_test_transform_listener, transform_listener_as_member)
custom_node->init_tf_listener();
}

TEST(tf2_test_transform_listener, transform_listener_should_destroy_correctly)
{
rclcpp::Clock::SharedPtr clock = std::make_shared<rclcpp::Clock>(RCL_SYSTEM_TIME);
tf2_ros::Buffer buffer(clock);
tf2_ros::TransformListener tfl(buffer, true);
(void) tfl;
}

int main(int argc, char ** argv)
{
testing::InitGoogleTest(&argc, argv);
Expand Down

0 comments on commit 5326e5a

Please sign in to comment.