scenario_simulator_v2 C++ API
Macros
expect_eq_macros.hpp File Reference
#include <gtest/gtest.h>
#include <geometry_msgs/msg/point.hpp>
#include <geometry_msgs/msg/vector3.hpp>
Include dependency graph for expect_eq_macros.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EXPECT_DECIMAL_EQ(DATA0, DATA1, TOLERANCE)    EXPECT_TRUE(std::fabs(DATA0 - DATA1) <= std::fabs(TOLERANCE));
 
#define EXPECT_POINT_EQ(DATA0, DATA1)
 
#define EXPECT_BOOST_POINT_2D_AND_POINT_EQ(DATA0, DATA1)
 
#define EXPECT_POINT_NEAR(DATA0, DATA1, TOLERANCE)
 
#define EXPECT_POINT_NAN(DATA)
 
#define EXPECT_VECTOR3_EQ(DATA0, DATA1)
 
#define EXPECT_VECTOR3_NEAR(DATA0, DATA1, TOLERANCE)
 
#define EXPECT_QUATERNION_EQ(DATA0, DATA1)
 
#define EXPECT_QUATERNION_NEAR(DATA0, DATA1, TOLERANCE)
 
#define EXPECT_POSE_EQ(DATA0, DATA1)
 
#define EXPECT_POSE_NEAR(DATA0, DATA1, TOLERANCE)
 
#define EXPECT_LANELET_POSE_EQ(DATA0, DATA1)
 
#define EXPECT_TWIST_EQ(DATA0, DATA1)
 
#define EXPECT_ACCEL_EQ(DATA0, DATA1)
 
#define EXPECT_ACTION_STATUS_EQ(DATA0, DATA1)
 
#define EXPECT_DETECTION_SENSOR_CONFIGURATION_EQ(DATA0, DATA1)
 

Macro Definition Documentation

◆ EXPECT_ACCEL_EQ

#define EXPECT_ACCEL_EQ (   DATA0,
  DATA1 
)
Value:
EXPECT_VECTOR3_EQ(DATA0.linear, DATA1.linear); \
EXPECT_VECTOR3_EQ(DATA0.angular, DATA1.angular);
#define EXPECT_VECTOR3_EQ(DATA0, DATA1)
Definition: expect_eq_macros.hpp:45

◆ EXPECT_ACTION_STATUS_EQ

#define EXPECT_ACTION_STATUS_EQ (   DATA0,
  DATA1 
)
Value:
EXPECT_ACCEL_EQ(DATA0.accel, DATA1.accel); \
EXPECT_TWIST_EQ(DATA0.twist, DATA1.twist); \
EXPECT_STREQ(DATA0.current_action.c_str(), DATA1.current_action.c_str());
#define EXPECT_ACCEL_EQ(DATA0, DATA1)
Definition: expect_eq_macros.hpp:85

◆ EXPECT_BOOST_POINT_2D_AND_POINT_EQ

#define EXPECT_BOOST_POINT_2D_AND_POINT_EQ (   DATA0,
  DATA1 
)
Value:
EXPECT_DOUBLE_EQ(DATA0.x(), DATA1.x); \
EXPECT_DOUBLE_EQ(DATA0.y(), DATA1.y);

◆ EXPECT_DECIMAL_EQ

#define EXPECT_DECIMAL_EQ (   DATA0,
  DATA1,
  TOLERANCE 
)     EXPECT_TRUE(std::fabs(DATA0 - DATA1) <= std::fabs(TOLERANCE));

◆ EXPECT_DETECTION_SENSOR_CONFIGURATION_EQ

#define EXPECT_DETECTION_SENSOR_CONFIGURATION_EQ (   DATA0,
  DATA1 
)
Value:
EXPECT_STREQ(DATA0.entity().c_str(), DATA1.entity().c_str()); \
EXPECT_STREQ(DATA0.architecture_type().c_str(), DATA1.architecture_type().c_str()); \
EXPECT_DOUBLE_EQ(DATA0.update_duration(), DATA1.update_duration());

◆ EXPECT_LANELET_POSE_EQ

#define EXPECT_LANELET_POSE_EQ (   DATA0,
  DATA1 
)
Value:
EXPECT_EQ(DATA0.lanelet_id, DATA1.lanelet_id); \
EXPECT_DOUBLE_EQ(DATA0.s, DATA1.s); \
EXPECT_DOUBLE_EQ(DATA0.offset, DATA1.offset); \
EXPECT_VECTOR3_EQ(DATA0.rpy, DATA1.rpy);

◆ EXPECT_POINT_EQ

#define EXPECT_POINT_EQ (   DATA0,
  DATA1 
)
Value:
EXPECT_DOUBLE_EQ(DATA0.x, DATA1.x); \
EXPECT_DOUBLE_EQ(DATA0.y, DATA1.y); \
EXPECT_DOUBLE_EQ(DATA0.z, DATA1.z);

◆ EXPECT_POINT_NAN

#define EXPECT_POINT_NAN (   DATA)
Value:
EXPECT_TRUE(std::isnan(DATA.x)); \
EXPECT_TRUE(std::isnan(DATA.y)); \
EXPECT_TRUE(std::isnan(DATA.z));

◆ EXPECT_POINT_NEAR

#define EXPECT_POINT_NEAR (   DATA0,
  DATA1,
  TOLERANCE 
)
Value:
EXPECT_NEAR(DATA0.x, DATA1.x, TOLERANCE); \
EXPECT_NEAR(DATA0.y, DATA1.y, TOLERANCE); \
EXPECT_NEAR(DATA0.z, DATA1.z, TOLERANCE);

◆ EXPECT_POSE_EQ

#define EXPECT_POSE_EQ (   DATA0,
  DATA1 
)
Value:
EXPECT_POINT_EQ(DATA0.position, DATA1.position); \
EXPECT_QUATERNION_EQ(DATA0.orientation, DATA1.orientation);
#define EXPECT_POINT_EQ(DATA0, DATA1)
Definition: expect_eq_macros.hpp:26

◆ EXPECT_POSE_NEAR

#define EXPECT_POSE_NEAR (   DATA0,
  DATA1,
  TOLERANCE 
)
Value:
EXPECT_POINT_NEAR(DATA0.position, DATA1.position, TOLERANCE); \
EXPECT_QUATERNION_NEAR(DATA0.orientation, DATA1.orientation, TOLERANCE);
#define EXPECT_POINT_NEAR(DATA0, DATA1, TOLERANCE)
Definition: expect_eq_macros.hpp:35

◆ EXPECT_QUATERNION_EQ

#define EXPECT_QUATERNION_EQ (   DATA0,
  DATA1 
)
Value:
EXPECT_DOUBLE_EQ(DATA0.x, DATA1.x); \
EXPECT_DOUBLE_EQ(DATA0.y, DATA1.y); \
EXPECT_DOUBLE_EQ(DATA0.z, DATA1.z); \
EXPECT_DOUBLE_EQ(DATA0.w, DATA1.w);

◆ EXPECT_QUATERNION_NEAR

#define EXPECT_QUATERNION_NEAR (   DATA0,
  DATA1,
  TOLERANCE 
)
Value:
EXPECT_NEAR(DATA0.x, DATA1.x, TOLERANCE); \
EXPECT_NEAR(DATA0.y, DATA1.y, TOLERANCE); \
EXPECT_NEAR(DATA0.z, DATA1.z, TOLERANCE); \
EXPECT_NEAR(DATA0.w, DATA1.w, TOLERANCE);

◆ EXPECT_TWIST_EQ

#define EXPECT_TWIST_EQ (   DATA0,
  DATA1 
)
Value:
EXPECT_VECTOR3_EQ(DATA0.linear, DATA1.linear); \
EXPECT_VECTOR3_EQ(DATA0.angular, DATA1.angular);

◆ EXPECT_VECTOR3_EQ

#define EXPECT_VECTOR3_EQ (   DATA0,
  DATA1 
)
Value:
EXPECT_DOUBLE_EQ(DATA0.x, DATA1.x); \
EXPECT_DOUBLE_EQ(DATA0.y, DATA1.y); \
EXPECT_DOUBLE_EQ(DATA0.z, DATA1.z);

◆ EXPECT_VECTOR3_NEAR

#define EXPECT_VECTOR3_NEAR (   DATA0,
  DATA1,
  TOLERANCE 
)
Value:
EXPECT_NEAR(DATA0.x, DATA1.x, TOLERANCE); \
EXPECT_NEAR(DATA0.y, DATA1.y, TOLERANCE); \
EXPECT_NEAR(DATA0.z, DATA1.z, TOLERANCE);