13 #include <gtest/gtest.h> 28 if( try_to_access_bb )
31 blackboard()->set(KEY(), 33);
36 blackboard()->get(KEY(), _value);
42 blackboard()->set(KEY(), _value);
46 static const char*
KEY() {
return "my_entry"; }
57 TEST(BlackboardTest, CheckOInit)
59 auto bb = Blackboard::create<BlackboardLocal>();
62 EXPECT_THROW(
InitTestNode(
true,
"init_test"), std::logic_error );
72 ASSERT_EQ( bb->get<
int>(KEY), 22 );
80 ASSERT_EQ( bb->get<
int>(KEY), 44 );
TEST(BlackboardTest, CheckOInit)
NodeStatus tick()
Method to be implemented by the user.
The SyncActionNode is an helper derived class that explicitly forbids the status RUNNING and doesn't ...
static const char * KEY()
virtual NodeStatus executeTick() override
The method that will be executed to invoke tick(); and setStatus();.
InitTestNode(bool try_to_access_bb, const std::string &name)
void setBlackboard(const Blackboard::Ptr &bb)
void setStatus(NodeStatus new_status)