Skip to content

Commit

Permalink
Add a unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyZe committed Nov 29, 2024
1 parent ff14d91 commit 3d3f1c7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/gtest_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,14 @@ TEST(BehaviorTreeReload, ReloadSameTree)
}
}

TEST(BehaviorTreeFactory, TwoAsyncNodesInReactiveSequence)
{
BehaviorTreeFactory factory;

std::string path = FilePath("trees/two_async_nodes_in_reactive_seq.xml");
EXPECT_ANY_THROW(auto tree = factory.createTreeFromFile(path));
}

KeyValueVector makeTestMetadata()
{
return {
Expand Down
8 changes: 8 additions & 0 deletions tests/trees/two_async_nodes_in_reactive_seq.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<root BTCPP_format="4" main_tree_to_execute = "ParentNoInclude">
<BehaviorTree ID="TwoAsyncNodesInReactiveSeq">
<ReactiveSequence>
<StatefulActionNode name="Async1"/>
<StatefulActionNode name="Async2"/>
</ReactiveSequence>
</BehaviorTree>
</root>

0 comments on commit 3d3f1c7

Please sign in to comment.