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

Function TEST_F

tests/gtest_tree.cpp:58–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56/****************TESTS START HERE***************************/
57
58TEST_F(BehaviorTreeTest, Condition1ToFalseCondition2True)
59{
60 condition_1.setExpectedResult(NodeStatus::FAILURE);
61 condition_2.setExpectedResult(NodeStatus::SUCCESS);
62
63 BT::NodeStatus state = root.executeTick();
64
65 ASSERT_EQ(NodeStatus::RUNNING, state);
66 ASSERT_EQ(NodeStatus::SUCCESS, fal_conditions.status());
67 ASSERT_EQ(NodeStatus::IDLE, condition_1.status());
68 ASSERT_EQ(NodeStatus::IDLE, condition_2.status());
69 ASSERT_EQ(NodeStatus::RUNNING, action_1.status());
70}
71
72TEST_F(BehaviorTreeTest, Condition2ToFalseCondition1True)
73{

Callers

nothing calls this directly

Calls 5

printTreeRecursivelyFunction · 0.85
statusMethod · 0.80
setExpectedResultMethod · 0.45
executeTickMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected