#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>
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
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.
Function Documentation
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 |
|
|
) |
| |