test_utils Namespace
Definition
Classes Index
| class | WithActionBehavior<BehaviorT, ClientInterfaceT> |
| class | WithBehavior<BehaviorT> |
|
Adds testing capabilities of Behaviors with context to any test fixture. More... | |
| class | WithBehaviorWithoutContext<BehaviorT> |
|
Adds testing capabilities of Behaviors without context to any test fixture. More... | |
| class | WrongBehaviorPortsException |
|
Exception thrown by Behavior testing classes when the Behavior does not define exactly the expected ports. More... | |
Typedefs Index
| using | PortSetter = std::function< void(BT::Blackboard &, const std::string &)> |
|
A callable that sets a Behavior port in a blackboard. More... | |
| using | PortSetterMap = std::map< std::string, PortSetter > |
|
A map associating port names to their setters. More... | |
| using | PortSetterMapGenerator = const PortSetterMap &(*)(void) |
|
A function generating a map of port setters. More... | |
Functions Index
| BT::NodeConfiguration | createNodeConfig (const std::set< std::string > &input_port_ids, const std::set< std::string > &output_port_ids) |
| std::string | joinStrings (const std::set< std::string > &input) |
| std::set< std::string > | getPortIDsWithDirection (const BT::PortsList &ports, const BT::PortDirection direction) |
| std::string | comparePortIds (const std::set< std::string > &actual, const std::set< std::string > &expected) |
| void | checkBehaviorPortExpectations (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 auto | kPortNotSetTestsMaxTimeBehaviorIsInRunningStatus = std::chrono::milliseconds(100) |
Typedefs
PortSetter
|
A callable that sets a Behavior port in a blackboard.
Definition at line 23 of file test_behavior.hpp.
PortSetterMap
|
A map associating port names to their setters.
Definition at line 28 of file test_behavior.hpp.
PortSetterMapGenerator
|
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()
|
Definition at line 90 of file test_behavior_impl.hpp.
comparePortIds()
|
Definition at line 65 of file test_behavior_impl.hpp.
createNodeConfig()
|
Definition at line 15 of file test_behavior_impl.hpp.
getPortIDs()
|
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()
|
Definition at line 52 of file test_behavior_impl.hpp.
joinStrings()
|
Definition at line 33 of file test_behavior_impl.hpp.
Variables
kPortNotSetTestsMaxTimeBehaviorIsInRunningStatus
| 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.