Defines | Functions
utest.cpp File Reference
#include <cmath>
#include <stdexcept>
#include <gtest/gtest.h>
#include <ros/ros.h>
#include <ros/message.h>
#include <ros/serialization.h>
#include <sensor_msgs/LaserScan.h>
#include <lama_interfaces/AddInterface.h>
#include <lama_interfaces/GetVectorDouble.h>
#include <lama_interfaces/SetVectorDouble.h>
#include <lama_interfaces/GetVectorLaserScan.h>
#include <lama_interfaces/SetVectorLaserScan.h>
Include dependency graph for utest.cpp:

Go to the source code of this file.

Defines

#define PREPARE_GETTER_SETTER(iface_name, msg, iface_type)
#define PREPARE_GETTER_SETTER_CLEARTEXT(iface_name, msg)   PREPARE_GETTER_SETTER(iface_name, msg, lama_interfaces::AddInterfaceRequest::CLEARTEXT)
#define PREPARE_GETTER_SETTER_SERIALIZED(iface_name, msg)   PREPARE_GETTER_SETTER(iface_name, msg, lama_interfaces::AddInterfaceRequest::SERIALIZED)

Functions

testing::AssertionResult headerEqual (const std_msgs::Header &a, const std_msgs::Header &b)
bool initMapInterface (const std::string &interface_name, const std::string &get_service_message, const std::string &set_service_message, std::string &get_service_name, std::string &set_service_name, uint32_t interface_type)
testing::AssertionResult laserScanEqual (sensor_msgs::LaserScan &a, sensor_msgs::LaserScan &b)
int main (int argc, char **argv)
 TEST (TestSuite, testVectorDoubleSerialized)
 TEST (TestSuite, testVectorLaserScanSerialized)
 TEST (TestSuite, testVectorDoubleCleartext)
 TEST (TestSuite, testVectorLaserScanCleartext)

Define Documentation

#define PREPARE_GETTER_SETTER (   iface_name,
  msg,
  iface_type 
)
Value:
std::string get_service_name; \
  std::string set_service_name; \
  if (!initMapInterface(#iface_name, "lama_interfaces/Get" #msg, "lama_interfaces/Set" #msg, get_service_name, set_service_name, iface_type)) \
  { \
    throw std::runtime_error("Could not create map interface iface_name"); \
  } \
  ros::NodeHandle nh; \
  ros::ServiceClient getter = nh.serviceClient<lama_interfaces::Get##msg>(get_service_name); \
  getter.waitForExistence(); \
  ros::ServiceClient setter = nh.serviceClient<lama_interfaces::Set##msg>(set_service_name); \
  setter.waitForExistence();

Definition at line 17 of file utest.cpp.

#define PREPARE_GETTER_SETTER_CLEARTEXT (   iface_name,
  msg 
)    PREPARE_GETTER_SETTER(iface_name, msg, lama_interfaces::AddInterfaceRequest::CLEARTEXT)

Definition at line 31 of file utest.cpp.

#define PREPARE_GETTER_SETTER_SERIALIZED (   iface_name,
  msg 
)    PREPARE_GETTER_SETTER(iface_name, msg, lama_interfaces::AddInterfaceRequest::SERIALIZED)

Definition at line 30 of file utest.cpp.


Function Documentation

testing::AssertionResult headerEqual ( const std_msgs::Header a,
const std_msgs::Header b 
)

Definition at line 58 of file utest.cpp.

bool initMapInterface ( const std::string &  interface_name,
const std::string &  get_service_message,
const std::string &  set_service_message,
std::string &  get_service_name,
std::string &  set_service_name,
uint32_t  interface_type 
)

Definition at line 33 of file utest.cpp.

testing::AssertionResult laserScanEqual ( sensor_msgs::LaserScan &  a,
sensor_msgs::LaserScan &  b 
)

Definition at line 74 of file utest.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 226 of file utest.cpp.

TEST ( TestSuite  ,
testVectorDoubleSerialized   
)

Definition at line 106 of file utest.cpp.

TEST ( TestSuite  ,
testVectorLaserScanSerialized   
)

Definition at line 127 of file utest.cpp.

TEST ( TestSuite  ,
testVectorDoubleCleartext   
)

Definition at line 166 of file utest.cpp.

TEST ( TestSuite  ,
testVectorLaserScanCleartext   
)

Definition at line 187 of file utest.cpp.



interfaces
Author(s): Gaël Ecorchard , Karel Košnar
autogenerated on Sat Jun 8 2019 19:03:14