MoveIt Pro Behavior
Core Behaviors for MoveIt Pro
test_behavior_input_port_not_set.hpp File Reference
#include <gmock/gmock.h>
#include <moveit_studio_behavior_interface/shared_resources_node.hpp>
#include <moveit_studio_behavior_interface/test_behavior.hpp>
#include <moveit_studio_common/test_utils/ros_test.hpp>
Include dependency graph for test_behavior_input_port_not_set.hpp:

Namespaces

 moveit_studio
 
 moveit_studio::test_utils
 

Macros

#define DEFAULT_FIXTURE_(behavior_class)    public ::moveit_studio::test_utils::WithBehavior<behavior_class>, public ::moveit_studio::test_utils::RosTest
 
#define INSTANTIATE_BEHAVIOR_PORT_NOT_SET_TESTS_(test_fixture, behavior_class, input_port_setter_generator, output_port_setter_generator, pre_tick_code)
 
#define INSTANTIATE_SYNC_BEHAVIOR_PORT_NOT_SET_TESTS(behavior_class, input_port_setter_generator, output_port_setter_generator)
 Automatically instantiates tests for the "input Behavior port not set" situation for synchronous Behaviors with context. More...
 
#define INSTANTIATE_ASYNC_BEHAVIOR_PORT_NOT_SET_TESTS(behavior_class, input_port_setter_generator, output_port_setter_generator)
 Automatically instantiates tests for the "input Behavior port not set" situation for asynchronous Behaviors with context. More...
 
#define INSTANTIATE_ACTION_BEHAVIOR_PORT_NOT_SET_TESTS(test_fixture, behavior_class, input_port_setter_generator, output_port_setter_generator)
 Automatically instantiates tests for the "input Behavior port not set" situation for asynchronous Behaviors with context that require a specific text fixture. More...
 

Variables

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

Macro Definition Documentation

◆ DEFAULT_FIXTURE_

#define DEFAULT_FIXTURE_ (   behavior_class)     public ::moveit_studio::test_utils::WithBehavior<behavior_class>, public ::moveit_studio::test_utils::RosTest

◆ INSTANTIATE_ACTION_BEHAVIOR_PORT_NOT_SET_TESTS

#define INSTANTIATE_ACTION_BEHAVIOR_PORT_NOT_SET_TESTS (   test_fixture,
  behavior_class,
  input_port_setter_generator,
  output_port_setter_generator 
)
Value:
public test_fixture, behavior_class, input_port_setter_generator, output_port_setter_generator, \
ASSERT_EQ(behavior().executeTick(), BT::NodeStatus::RUNNING) \
<< "Should you use INSTANTIATE_SYNC_BEHAVIOR_PORT_NOT_SET_TESTS instead?"; \
constexpr auto kPortNotSetTestsMaxTimeBehaviorIsInRunningStatus
Definition: test_behavior_input_port_not_set.hpp:17
#define INSTANTIATE_BEHAVIOR_PORT_NOT_SET_TESTS_(test_fixture, behavior_class, input_port_setter_generator, output_port_setter_generator, pre_tick_code)
Definition: test_behavior_input_port_not_set.hpp:25

Automatically instantiates tests for the "input Behavior port not set" situation for asynchronous Behaviors with context that require a specific text fixture.

One test is generated for each Behavior input port.

Parameters
test_fixtureTest fixture that sets up all action server mocks.
behavior_classClass of the behavior under test. It cannot have namespace qualifiers. If those are needed, please use a using statement in the test file.
input_port_setter_generatorA port setter map generator defining the expected input ports.
output_port_setter_generatorA port setter map generator defining the expected output ports.

◆ INSTANTIATE_ASYNC_BEHAVIOR_PORT_NOT_SET_TESTS

#define INSTANTIATE_ASYNC_BEHAVIOR_PORT_NOT_SET_TESTS (   behavior_class,
  input_port_setter_generator,
  output_port_setter_generator 
)
Value:
DEFAULT_FIXTURE_(behavior_class), behavior_class, input_port_setter_generator, output_port_setter_generator, \
ASSERT_EQ(behavior().executeTick(), BT::NodeStatus::RUNNING) \
<< "Should you use INSTANTIATE_SYNC_BEHAVIOR_PORT_NOT_SET_TESTS instead?"; \
#define DEFAULT_FIXTURE_(behavior_class)
Definition: test_behavior_input_port_not_set.hpp:22

Automatically instantiates tests for the "input Behavior port not set" situation for asynchronous Behaviors with context.

One test is generated for each Behavior input port.

Parameters
behavior_classClass of the behavior under test. It cannot have namespace qualifiers. If those are needed, please use a using statement in the test file.
input_port_setter_generatorA port setter map generator defining the expected input ports.
output_port_setter_generatorA port setter map generator defining the expected output ports.

◆ INSTANTIATE_BEHAVIOR_PORT_NOT_SET_TESTS_

#define INSTANTIATE_BEHAVIOR_PORT_NOT_SET_TESTS_ (   test_fixture,
  behavior_class,
  input_port_setter_generator,
  output_port_setter_generator,
  pre_tick_code 
)

◆ INSTANTIATE_SYNC_BEHAVIOR_PORT_NOT_SET_TESTS

#define INSTANTIATE_SYNC_BEHAVIOR_PORT_NOT_SET_TESTS (   behavior_class,
  input_port_setter_generator,
  output_port_setter_generator 
)
Value:
input_port_setter_generator, output_port_setter_generator, )

Automatically instantiates tests for the "input Behavior port not set" situation for synchronous Behaviors with context.

One test is generated for each Behavior input port.

Parameters
behavior_classClass of the behavior under test. It cannot have namespace qualifiers. If those are needed, please use a using statement in the test file.
input_port_setter_generatorA port setter map generator defining the expected input ports.
output_port_setter_generatorA port setter map generator defining the expected output ports.