Skip to main content

test_utils Namespace

Definition

namespace moveit_pro::test_utils { ... }

Classes Index

classWithActionBehavior<BehaviorT, ClientInterfaceT>
classWithBehavior<BehaviorT>

Adds testing capabilities of Behaviors with context to any test fixture. More...

classWithBehaviorWithoutContext<BehaviorT>

Adds testing capabilities of Behaviors without context to any test fixture. More...

classWrongBehaviorPortsException

Exception thrown by Behavior testing classes when the Behavior does not define exactly the expected ports. More...

Typedefs Index

usingPortSetter = std::function< void(BT::Blackboard &, const std::string &)>

A callable that sets a Behavior port in a blackboard. More...

usingPortSetterMap = std::map< std::string, PortSetter >

A map associating port names to their setters. More...

usingPortSetterMapGenerator = const PortSetterMap &(*)(void)

A function generating a map of port setters. More...

Functions Index

BT::NodeConfigurationcreateNodeConfig (const std::set< std::string > &input_port_ids, const std::set< std::string > &output_port_ids)
std::stringjoinStrings (const std::set< std::string > &input)
std::set< std::string >getPortIDsWithDirection (const BT::PortsList &ports, const BT::PortDirection direction)
std::stringcomparePortIds (const std::set< std::string > &actual, const std::set< std::string > &expected)
voidcheckBehaviorPortExpectations (const std::string &behavior_name, const BT::PortsList &actual_port_list, const PortSetterMap &expected_input_port_setters, const PortSetterMap &expected_output_port_setters)
std::set< std::string >getPortIDs (const PortSetterMap &map, bool only_mandatory=false)

Returns port IDs in a port setter map. More...

Variables Index

constexpr autokPortNotSetTestsMaxTimeBehaviorIsInRunningStatus = std::chrono::milliseconds(100)

Typedefs

PortSetter

using moveit_pro::test_utils::PortSetter = typedef std::function<void(BT::Blackboard&, const std::string&)>

A callable that sets a Behavior port in a blackboard.

Definition at line 23 of file test_behavior.hpp.

PortSetterMap

using moveit_pro::test_utils::PortSetterMap = typedef std::map<std::string, PortSetter>

A map associating port names to their setters.

Definition at line 28 of file test_behavior.hpp.

PortSetterMapGenerator

using moveit_pro::test_utils::PortSetterMapGenerator = typedef const PortSetterMap& (*)(void)

A function generating a map of port setters.

Setters for input and output ports are passed to the Behavior testing classes and macros to automatically generate port tests.

Definition at line 35 of file test_behavior.hpp.

Functions

checkBehaviorPortExpectations()

void moveit_pro::test_utils::checkBehaviorPortExpectations (const std::string & behavior_name, const BT::PortsList & actual_port_list, const PortSetterMap & expected_input_port_setters, const PortSetterMap & expected_output_port_setters)

Definition at line 90 of file test_behavior_impl.hpp.

comparePortIds()

std::string moveit_pro::test_utils::comparePortIds (const std::set< std::string > & actual, const std::set< std::string > & expected)

Definition at line 65 of file test_behavior_impl.hpp.

createNodeConfig()

BT::NodeConfiguration moveit_pro::test_utils::createNodeConfig (const std::set< std::string > & input_port_ids, const std::set< std::string > & output_port_ids)

Definition at line 15 of file test_behavior_impl.hpp.

getPortIDs()

std::set< std::string > moveit_pro::test_utils::getPortIDs (const PortSetterMap & map, bool only_mandatory=false)

Returns port IDs in a port setter map.

Parameters
map

The map from which to retrieve port IDs.

only_mandatory

if true, does not return IDs for optional ports.

Returns

If only_mandatory is false, IDs of all ports in the map; if only_mandatory is true, only IDs of mandatory ports.

Definition at line 115 of file test_behavior_impl.hpp.

getPortIDsWithDirection()

std::set< std::string > moveit_pro::test_utils::getPortIDsWithDirection (const BT::PortsList & ports, const BT::PortDirection direction)

Definition at line 52 of file test_behavior_impl.hpp.

joinStrings()

std::string moveit_pro::test_utils::joinStrings (const std::set< std::string > & input)

Definition at line 33 of file test_behavior_impl.hpp.

Variables

kPortNotSetTestsMaxTimeBehaviorIsInRunningStatus

constexpr auto moveit_pro::test_utils::kPortNotSetTestsMaxTimeBehaviorIsInRunningStatus = std::chrono::milliseconds(100)
constexpr

Definition at line 18 of file test_behavior_input_port_not_set.hpp.


The documentation for this namespace was generated from the following files:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.