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

Function TEST_F

tests/gtest_async_action_node.cpp:71–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71TEST_F(MockedThreadedActionFixture, no_halt)
72{
73 // Test verifies that halt returns immediately, if the node is idle. It
74 // further checks if the halt-flag is reset correctly.
75 sn.halt();
76 ASSERT_TRUE(sn.isHaltRequested());
77
78 // Below we further verify that the halt flag is cleaned up properly.
79 const BT::NodeStatus state{ BT::NodeStatus::SUCCESS };
80 EXPECT_CALL(sn, tick()).WillOnce(testing::Return(state));
81
82 // Spin the node and check.
83 ASSERT_EQ(sn.spinUntilDone(), state);
84 ASSERT_FALSE(sn.isHaltRequested());
85}
86
87TEST_F(MockedThreadedActionFixture, halt)
88{

Callers

nothing calls this directly

Calls 7

spinUntilDoneMethod · 0.80
waitMethod · 0.80
statusMethod · 0.80
setStatusMethod · 0.80
haltMethod · 0.45
isHaltRequestedMethod · 0.45
executeTickMethod · 0.45

Tested by

no test coverage detected