test_defaultsAtLaunch.cpp
Go to the documentation of this file.
1 #include <gtest/gtest.h>
2 #include <ros/ros.h>
3 #include <rosparam_handler/DefaultsAtLaunchParameters.h>
4 
5 typedef rosparam_handler::DefaultsAtLaunchParameters ParamType;
6 typedef rosparam_handler::DefaultsAtLaunchConfig ConfigType;
7 
8 TEST(RosparamHandler, DefaultsAtLaunch) {
9  ParamType testParams(ros::NodeHandle("~"));
10  ASSERT_NO_THROW(testParams.fromParamServer());
11 
12  ASSERT_EQ(1, testParams.int_param_wo_default);
13  ASSERT_DOUBLE_EQ(1.1, testParams.double_param_wo_default);
14  ASSERT_EQ("Hello World", testParams.str_param_wo_default);
15  ASSERT_EQ(true, testParams.bool_param_wo_default);
16 
17  ASSERT_EQ(std::vector<int>({1, 2, 3}), testParams.vector_int_param_wo_default);
18  ASSERT_EQ(std::vector<double>({1.1, 1.2, 1.3}), testParams.vector_double_param_wo_default);
19  ASSERT_EQ(std::vector<bool>({false, true}), testParams.vector_bool_param_wo_default);
20  ASSERT_EQ(std::vector<std::string>({"Hello", "World"}), testParams.vector_string_param_wo_default);
21 
22  std::map<std::string, std::string> tmp{{"Hello", "World"}};
23  ASSERT_EQ(tmp, testParams.map_param_wo_default);
24 
25  ASSERT_EQ(1, testParams.enum_param_wo_default);
26 }
rosparam_handler::DefaultsAtLaunchConfig ConfigType
TEST(RosparamHandler, DefaultsAtLaunch)
rosparam_handler::DefaultsAtLaunchParameters ParamType
rosparam_handler::DefaultsParameters ParamType


rosparam_handler
Author(s): Claudio Bandera
autogenerated on Mon Jun 10 2019 14:48:10