7 #include <catch_ros/catch.hpp> 16 struct StringMaker<
XmlRpc::XmlRpcValue::Type>
31 default:
return "unknown type";
37 struct StringMaker<
XmlRpc::XmlRpcValue>
50 ss <<
"<int>(" <<
static_cast<int>(copy) <<
")";
53 ss <<
"<bool>(" <<
static_cast<bool>(copy) <<
")";
56 ss <<
"<string>('" <<
static_cast<std::string
>(copy) <<
"')";
59 ss <<
"<double>(" <<
static_cast<double>(copy) <<
")";
79 for(
auto&
param : value)
96 auto it = parameters.find(name);
97 REQUIRE(it != parameters.end());
101 REQUIRE(value.getType() == expectedType);
103 T typedValue = value;
105 REQUIRE(typedValue == expected);
114 auto it = parameters.find(name);
115 REQUIRE(it != parameters.end());
119 T typedValue = value;
130 auto it = parameters.find(name);
131 REQUIRE(it != parameters.end());
135 REQUIRE(value.getType() == expectedType);
137 T typedValue = value;
void checkTypedParam(const ParameterMap ¶meters, const std::string &name, XmlRpc::XmlRpcValue::Type expectedType, T expected)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val)
Type const & getType() const
T getTypedParam(const ParameterMap ¶meters, const std::string &name)
static std::string convert(const ParameterMap &value)
static std::string convert(const XmlRpc::XmlRpcValue &value)
std::map< std::string, XmlRpc::XmlRpcValue > ParameterMap
static std::string convert(const XmlRpc::XmlRpcValue::Type &value)