| 69 | } |
| 70 | |
| 71 | TEST_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 | |
| 87 | TEST_F(MockedThreadedActionFixture, halt) |
| 88 | { |
nothing calls this directly
no test coverage detected