comply to new subscription template (#500)

This commit is contained in:
Karsten Knese 2018-06-19 00:20:55 +02:00 committed by GitHub
parent bfbb263f3c
commit d33a46c3b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 6 deletions

View file

@ -203,3 +203,12 @@ TEST_F(TestDefaultStateMachine, bad_mood) {
// check if all callbacks were successfully overwritten
EXPECT_EQ(static_cast<size_t>(1), test_node->number_of_callbacks);
}
TEST_F(TestDefaultStateMachine, lifecycle_subscriber) {
auto test_node = std::make_shared<MoodyLifecycleNode<GoodMood>>("testnode");
auto cb = [](const std::shared_ptr<lifecycle_msgs::msg::State> msg) {(void) msg;};
auto lifecycle_sub = test_node->create_subscription<lifecycle_msgs::msg::State>("~/empty", cb);
SUCCEED();
}