Classes | Functions | Variables
gtest_factory.cpp File Reference
#include <gtest/gtest.h>
#include <filesystem>
#include <string>
#include <utility>
#include <vector>
#include "behaviortree_cpp/xml_parsing.h"
#include "../sample_nodes/crossdoor_nodes.h"
#include "../sample_nodes/dummy_nodes.h"
Include dependency graph for gtest_factory.cpp:

Go to the source code of this file.

Classes

class  ActionWithMetadata
 

Functions

std::string FilePath (const std::filesystem::path &relative_path)
 
KeyValueVector makeTestMetadata ()
 
 TEST (BehaviorTreeFactory, addMetadataToManifest)
 
 TEST (BehaviorTreeFactory, CreateTreeFromFile)
 
 TEST (BehaviorTreeFactory, CreateTreeFromFileWhichIncludesFileFromChildDirectory)
 
 TEST (BehaviorTreeFactory, CreateTreeFromFileWhichIncludesFileFromChildDirectoryWhichIncludesFileFromChildDirectory)
 
 TEST (BehaviorTreeFactory, CreateTreeFromFileWhichIncludesFileFromChildDirectoryWhichIncludesFileFromParentDirectory)
 
 TEST (BehaviorTreeFactory, CreateTreeFromFileWhichIncludesFileFromChildDirectoryWhichIncludesFileFromSameDirectory)
 
 TEST (BehaviorTreeFactory, CreateTreeFromFileWhichIncludesFileFromSameDirectory)
 
 TEST (BehaviorTreeFactory, Issue7)
 
 TEST (BehaviorTreeFactory, ManifestMethod)
 
 TEST (BehaviorTreeFactory, Subtree)
 
 TEST (BehaviorTreeFactory, SubTreeWithRemapping)
 
 TEST (BehaviorTreeFactory, WrongTreeName)
 
 TEST (BehaviorTreeFactory, XMLParsingOrder)
 
 TEST (BehaviorTreeReload, ReloadSameTree)
 

Variables

static const char * xml_ports_subtree
 
static const char * xml_text
 
static const char * xml_text_subtree
 
static const char * xml_text_subtree_part1
 
static const char * xml_text_subtree_part2
 

Function Documentation

◆ FilePath()

std::string FilePath ( const std::filesystem::path &  relative_path)

Definition at line 262 of file gtest_factory.cpp.

◆ makeTestMetadata()

KeyValueVector makeTestMetadata ( )

Definition at line 392 of file gtest_factory.cpp.

◆ TEST() [1/14]

TEST ( BehaviorTreeFactory  ,
addMetadataToManifest   
)

Definition at line 444 of file gtest_factory.cpp.

◆ TEST() [2/14]

TEST ( BehaviorTreeFactory  ,
CreateTreeFromFile   
)

Definition at line 280 of file gtest_factory.cpp.

◆ TEST() [3/14]

TEST ( BehaviorTreeFactory  ,
CreateTreeFromFileWhichIncludesFileFromChildDirectory   
)

Definition at line 300 of file gtest_factory.cpp.

◆ TEST() [4/14]

TEST ( BehaviorTreeFactory  ,
CreateTreeFromFileWhichIncludesFileFromChildDirectoryWhichIncludesFileFromChildDirectory   
)

Definition at line 322 of file gtest_factory.cpp.

◆ TEST() [5/14]

TEST ( BehaviorTreeFactory  ,
CreateTreeFromFileWhichIncludesFileFromChildDirectoryWhichIncludesFileFromParentDirectory   
)

Definition at line 334 of file gtest_factory.cpp.

◆ TEST() [6/14]

TEST ( BehaviorTreeFactory  ,
CreateTreeFromFileWhichIncludesFileFromChildDirectoryWhichIncludesFileFromSameDirectory   
)

Definition at line 310 of file gtest_factory.cpp.

◆ TEST() [7/14]

TEST ( BehaviorTreeFactory  ,
CreateTreeFromFileWhichIncludesFileFromSameDirectory   
)

Definition at line 290 of file gtest_factory.cpp.

◆ TEST() [8/14]

TEST ( BehaviorTreeFactory  ,
Issue7   
)

Definition at line 169 of file gtest_factory.cpp.

◆ TEST() [9/14]

TEST ( BehaviorTreeFactory  ,
ManifestMethod   
)

Definition at line 423 of file gtest_factory.cpp.

◆ TEST() [10/14]

TEST ( BehaviorTreeFactory  ,
Subtree   
)

Definition at line 138 of file gtest_factory.cpp.

◆ TEST() [11/14]

TEST ( BehaviorTreeFactory  ,
SubTreeWithRemapping   
)

Definition at line 212 of file gtest_factory.cpp.

◆ TEST() [12/14]

TEST ( BehaviorTreeFactory  ,
WrongTreeName   
)

Definition at line 346 of file gtest_factory.cpp.

◆ TEST() [13/14]

TEST ( BehaviorTreeFactory  ,
XMLParsingOrder   
)

Definition at line 107 of file gtest_factory.cpp.

◆ TEST() [14/14]

TEST ( BehaviorTreeReload  ,
ReloadSameTree   
)

Definition at line 361 of file gtest_factory.cpp.

Variable Documentation

◆ xml_ports_subtree

const char* xml_ports_subtree
static
Initial value:
= R"(
<root BTCPP_format="4" main_tree_to_execute="MainTree">
<BehaviorTree ID="TalkToMe">
<Sequence>
<SaySomething message="{hello_msg}" />
<SaySomething message="{bye_msg}" />
<Script code=" output:='done!' " />
</Sequence>
</BehaviorTree>
<BehaviorTree ID="MainTree">
<Sequence>
<Script code = " talk_hello:='hello' " />
<Script code = " talk_bye:='bye bye' " />
<SubTree ID="TalkToMe" hello_msg="{talk_hello}"
bye_msg="{talk_bye}"
output="{talk_out}" />
<SaySomething message="{talk_out}" />
</Sequence>
</BehaviorTree>
</root> )"

Definition at line 185 of file gtest_factory.cpp.

◆ xml_text

const char* xml_text
static

Definition at line 14 of file gtest_factory.cpp.

◆ xml_text_subtree

const char* xml_text_subtree
static
Initial value:
= R"(
<root BTCPP_format="4" main_tree_to_execute="MainTree" >
<BehaviorTree ID="MainTree">
<Sequence>
<Fallback>
<Inverter>
<IsDoorClosed/>
</Inverter>
<SubTree ID="DoorClosedSubtree"/>
</Fallback>
<PassThroughDoor/>
</Sequence>
</BehaviorTree>
<BehaviorTree ID="DoorClosedSubtree">
<Fallback>
<OpenDoor/>
<RetryUntilSuccessful num_attempts="5">
<PickLock/>
</RetryUntilSuccessful>
<SmashDoor/>
</Fallback>
</BehaviorTree>
</root> )"

Definition at line 51 of file gtest_factory.cpp.

◆ xml_text_subtree_part1

const char* xml_text_subtree_part1
static
Initial value:
= R"(
<root BTCPP_format="4">
<BehaviorTree ID="MainTree">
<Fallback name="root_selector">
<SubTree ID="DoorClosedSubtree" />
<Action ID="PassThroughWindow" />
</Fallback>
</BehaviorTree>
</root> )"

Definition at line 79 of file gtest_factory.cpp.

◆ xml_text_subtree_part2

const char* xml_text_subtree_part2
static
Initial value:
= R"(
<root BTCPP_format="4">
<BehaviorTree ID="DoorClosedSubtree">
<Sequence name="door_sequence">
<Decorator ID="Inverter">
<Action ID="IsDoorLocked" />
</Decorator>
<Action ID="OpenDoor" />
<Action ID="PassThroughDoor" />
<Action ID="CloseDoor" />
</Sequence>
</BehaviorTree>
</root> )"

Definition at line 90 of file gtest_factory.cpp.



behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Jun 28 2024 02:20:08