MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / TEST_F

Function TEST_F

tests/gtest_switch.cpp:83–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81};
82
83TEST_F(SwitchTest, DefaultCase)
84{
85 BT::NodeStatus state = root->executeTick();
86
87 ASSERT_EQ(NodeStatus::IDLE, action_1.status());
88 ASSERT_EQ(NodeStatus::IDLE, action_42.status());
89 ASSERT_EQ(NodeStatus::RUNNING, action_def.status());
90 ASSERT_EQ(NodeStatus::RUNNING, state);
91
92 std::this_thread::sleep_for(milliseconds(300));
93 state = root->executeTick();
94
95 ASSERT_EQ(NodeStatus::IDLE, action_1.status());
96 ASSERT_EQ(NodeStatus::IDLE, action_42.status());
97 ASSERT_EQ(NodeStatus::IDLE, action_def.status());
98 ASSERT_EQ(NodeStatus::SUCCESS, state);
99}
100
101TEST_F(SwitchTest, Case1)
102{

Callers

nothing calls this directly

Calls 4

statusMethod · 0.80
setMethod · 0.80
executeTickMethod · 0.45
setExpectedResultMethod · 0.45

Tested by

no test coverage detected