Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
  • Loading branch information
dirk-thomas committed May 24, 2019
1 parent 7e06e5a commit e926a06
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rclcpp/test/test_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,10 @@ TEST_F(TestExecutors, detachOnDestruction) {
EXPECT_NO_THROW(executor.add_node(node));
}
}

// Make sure that the executor can automatically remove expired nodes correctly
TEST_F(TestExecutors, addTemporaryNode) {
rclcpp::executors::SingleThreadedExecutor executor;
executor.add_node(std::make_shared<rclcpp::Node>("temporary_node"));
EXPECT_NO_THROW(executor.spin_some());
}

0 comments on commit e926a06

Please sign in to comment.