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

Function TEST_F

tests/gtest_decorator.cpp:109–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107/****************TESTS START HERE***************************/
108
109TEST_F(DeadlineTest, DeadlineTriggeredTest)
110{
111 BT::NodeStatus state = root.executeTick();
112 // Action takes longer than deadline, so it should timeout
113
114 ASSERT_EQ(NodeStatus::RUNNING, action.status());
115 ASSERT_EQ(NodeStatus::RUNNING, state);
116
117 std::this_thread::sleep_for(ACTION_LONG_MS + milliseconds(20));
118 state = root.executeTick();
119 ASSERT_EQ(NodeStatus::FAILURE, state);
120 ASSERT_EQ(NodeStatus::IDLE, action.status());
121}
122
123TEST_F(DeadlineTest, DeadlineNotTriggeredTest)
124{

Callers

nothing calls this directly

Calls 9

statusMethod · 0.80
setTimeMethod · 0.80
resetTicksMethod · 0.80
successCountMethod · 0.80
failureCountMethod · 0.80
resetCountersMethod · 0.80
executeTickMethod · 0.45
setExpectedResultMethod · 0.45
tickCountMethod · 0.45

Tested by

no test coverage detected