4 #include <catch_ros/catch.hpp> 6 #include "../../src/launch/launch_config.h" 18 <arg name="arg1" value="hello world" /> 19 <arg name="arg2" default="hello world" /> 20 <arg name="arg3" default="True" /> 22 <param name="arg1" value="$(arg arg1)" /> 23 <param name="arg2" value="$(arg arg2)" /> 24 <param name="arg3" type="bool" value="$(arg arg3)" /> 32 CHECK(getTypedParam<std::string>(
params,
"/arg1") ==
"hello world");
33 CHECK(getTypedParam<std::string>(
params,
"/arg2") ==
"hello world");
34 CHECK(getTypedParam<bool>(
params,
"/arg3") ==
true);
47 <arg name="arg2" default="hello world" /> 49 <param name="arg1" value="$(arg arg1)" /> 50 <param name="arg2" value="$(arg arg2)" /> 58 CHECK(getTypedParam<std::string>(
params,
"/arg1") ==
"test");
59 CHECK(getTypedParam<std::string>(
params,
"/arg2") ==
"test");
66 <param name="test" value="$(arg arg1)" /> 73 <param name="test" value="$(arg arg1)" /> 83 <arg name="arg1" value="hello world" /> 84 <arg name="arg2" default="hello world" /> 85 <arg name="arg3" default="True" /> 87 <param name="arg1" value="$(arg arg1 )" /> 88 <param name="arg2" value="$(arg arg2)" /> 89 <param name="arg3" type="bool" value="$(arg arg3 )" /> 97 CHECK(getTypedParam<std::string>(
params,
"/arg1") ==
"hello world");
98 CHECK(getTypedParam<std::string>(
params,
"/arg2") ==
"hello world");
99 CHECK(getTypedParam<bool>(
params,
"/arg3") ==
true);
TEST_CASE("arg basic","[arg]")
const std::map< std::string, XmlRpc::XmlRpcValue > & parameters() const
void evaluateParameters()
static void requireParsingException(const std::string &input)
void parseString(const std::string &input, bool onlyArguments=false)
void setArgument(const std::string &name, const std::string &value)