Fix bug when mixing shared_ptr and bind. (#470)
This commit is contained in:
parent
7cd8429534
commit
1be4d2d914
1 changed files with 9 additions and 9 deletions
|
@ -137,16 +137,16 @@ public:
|
||||||
TEST_F(TestRegisterCustomCallbacks, custom_callbacks) {
|
TEST_F(TestRegisterCustomCallbacks, custom_callbacks) {
|
||||||
auto test_node = std::make_shared<CustomLifecycleNode>("testnode");
|
auto test_node = std::make_shared<CustomLifecycleNode>("testnode");
|
||||||
|
|
||||||
test_node->register_on_configure(
|
test_node->register_on_configure(std::bind(&CustomLifecycleNode::on_custom_configure,
|
||||||
std::bind(&CustomLifecycleNode::on_custom_configure, test_node, std::placeholders::_1));
|
test_node.get(), std::placeholders::_1));
|
||||||
test_node->register_on_cleanup(std::bind(&CustomLifecycleNode::on_custom_cleanup, test_node,
|
test_node->register_on_cleanup(std::bind(&CustomLifecycleNode::on_custom_cleanup,
|
||||||
std::placeholders::_1));
|
test_node.get(), std::placeholders::_1));
|
||||||
test_node->register_on_shutdown(std::bind(&CustomLifecycleNode::on_custom_shutdown, test_node,
|
test_node->register_on_shutdown(std::bind(&CustomLifecycleNode::on_custom_shutdown,
|
||||||
std::placeholders::_1));
|
test_node.get(), std::placeholders::_1));
|
||||||
test_node->register_on_activate(std::bind(&CustomLifecycleNode::on_custom_activate, test_node,
|
test_node->register_on_activate(std::bind(&CustomLifecycleNode::on_custom_activate,
|
||||||
std::placeholders::_1));
|
test_node.get(), std::placeholders::_1));
|
||||||
test_node->register_on_deactivate(std::bind(&CustomLifecycleNode::on_custom_deactivate,
|
test_node->register_on_deactivate(std::bind(&CustomLifecycleNode::on_custom_deactivate,
|
||||||
test_node, std::placeholders::_1));
|
test_node.get(), std::placeholders::_1));
|
||||||
|
|
||||||
EXPECT_EQ(State::PRIMARY_STATE_UNCONFIGURED, test_node->get_current_state().id());
|
EXPECT_EQ(State::PRIMARY_STATE_UNCONFIGURED, test_node->get_current_state().id());
|
||||||
EXPECT_EQ(State::PRIMARY_STATE_INACTIVE, test_node->trigger_transition(
|
EXPECT_EQ(State::PRIMARY_STATE_INACTIVE, test_node->trigger_transition(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue