1 #include <gtest/gtest.h> 3 #include <rosparam_handler/DefaultsAtLaunchParameters.h> 5 typedef rosparam_handler::DefaultsAtLaunchParameters
ParamType;
6 typedef rosparam_handler::DefaultsAtLaunchConfig
ConfigType;
8 TEST(RosparamHandler, DefaultsAtLaunch) {
10 ASSERT_NO_THROW(testParams.fromParamServer());
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);
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);
22 std::map<std::string, std::string> tmp{{
"Hello",
"World"}};
23 ASSERT_EQ(tmp, testParams.map_param_wo_default);
25 ASSERT_EQ(1, testParams.enum_param_wo_default);
rosparam_handler::DefaultsAtLaunchConfig ConfigType
TEST(RosparamHandler, DefaultsAtLaunch)
rosparam_handler::DefaultsAtLaunchParameters ParamType
rosparam_handler::DefaultsParameters ParamType