test_minMax.cpp
Go to the documentation of this file.
1 #include <gtest/gtest.h>
2 #include <ros/ros.h>
3 #include <rosparam_handler/MinMaxParameters.h>
4 
5 typedef rosparam_handler::MinMaxParameters ParamType;
6 typedef rosparam_handler::MinMaxConfig ConfigType;
7 
8 TEST(RosparamHandler, MinMax) {
9  ParamType testParams(ros::NodeHandle("~"));
10  ASSERT_NO_THROW(testParams.fromParamServer());
11 
12  ASSERT_EQ(2, testParams.int_param_w_minmax);
13  ASSERT_DOUBLE_EQ(2., testParams.double_param_w_minmax);
14 
15  ASSERT_EQ(std::vector<int>({0, 2, 2}), testParams.vector_int_param_w_minmax);
16  ASSERT_EQ(std::vector<double>({0., 1.2, 2.}), testParams.vector_double_param_w_minmax);
17 
18  std::map<std::string, double> tmp{{"value1", 0.}, {"value2", 1.2}, {"value3", 2.}};
19  ASSERT_EQ(tmp, testParams.map_param_w_minmax);
20 }
TEST(RosparamHandler, MinMax)
Definition: test_minMax.cpp:8
rosparam_handler::MinMaxConfig ConfigType
Definition: test_minMax.cpp:6
rosparam_handler::MinMaxParameters ParamType
Definition: test_minMax.cpp:5
rosparam_handler::DefaultsParameters ParamType


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