test_minMax.cpp
Go to the documentation of this file.
00001 #include <gtest/gtest.h>
00002 #include <ros/ros.h>
00003 #include <rosparam_handler/MinMaxParameters.h>
00004 
00005 typedef rosparam_handler::MinMaxParameters ParamType;
00006 typedef rosparam_handler::MinMaxConfig ConfigType;
00007 
00008 TEST(RosparamHandler, MinMax) {
00009     ParamType testParams(ros::NodeHandle("~"));
00010     ASSERT_NO_THROW(testParams.fromParamServer());
00011 
00012     ASSERT_EQ(2, testParams.int_param_w_minmax);
00013     ASSERT_DOUBLE_EQ(2., testParams.double_param_w_minmax);
00014 
00015     ASSERT_EQ(std::vector<int>({0, 2, 2}), testParams.vector_int_param_w_minmax);
00016     ASSERT_EQ(std::vector<double>({0., 1.2, 2.}), testParams.vector_double_param_w_minmax);
00017 
00018     std::map<std::string, double> tmp{{"value1", 0.}, {"value2", 1.2}, {"value3", 2.}};
00019     ASSERT_EQ(tmp, testParams.map_param_w_minmax);
00020 }


rosparam_handler
Author(s): Claudio Bandera
autogenerated on Sat Jun 8 2019 20:21:53