Skip to content

Commit 56a8e8b

Browse files
committed
unit test issue #629
1 parent 74c7dd7 commit 56a8e8b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/gtest_factory.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,23 @@ TEST(
340340
ASSERT_EQ(NodeStatus::SUCCESS, tree.tickWhileRunning());
341341
}
342342

343+
TEST(
344+
BehaviorTreeFactory,
345+
WrongTreeName)
346+
{
347+
const char* xmlA = R"(
348+
<root BTCPP_format="4" >
349+
<BehaviorTree ID="MainTree">
350+
<AlwaysSuccess/>
351+
</BehaviorTree>
352+
</root> )";
353+
354+
BehaviorTreeFactory factory;
355+
356+
factory.registerBehaviorTreeFromText(xmlA);
357+
EXPECT_ANY_THROW(factory.createTree("Wrong Name"));
358+
}
359+
343360
TEST(BehaviorTreeReload, ReloadSameTree)
344361
{
345362
const char* xmlA = R"(

0 commit comments

Comments
 (0)