| 30 | )"; |
| 31 | |
| 32 | void throwRuntimeError() |
| 33 | { |
| 34 | BT::BehaviorTreeFactory factory; |
| 35 | factory.registerSimpleAction("ThrowRuntimeError", [](BT::TreeNode&) -> BT::NodeStatus { |
| 36 | throw BT::RuntimeError("Oops!"); |
| 37 | }); |
| 38 | |
| 39 | auto tree = factory.createTreeFromText(xml_text); |
| 40 | BT::Groot2Publisher publisher(tree); |
| 41 | EXPECT_THROW(tree.tickExactlyOnce(), BT::RuntimeError); |
| 42 | } |
| 43 | } // namespace |
| 44 | |
| 45 | TEST(Groot2PublisherTest, EnsureNoInfiniteLoopOnThrow) |
nothing calls this directly
no test coverage detected