test_basic.cpp
Go to the documentation of this file.
1 // Unit tests for basic loading
2 // Author: Max Schwarz <max.schwarz@ais.uni-bonn.de>
3 
4 #include <catch_ros/catch.hpp>
5 
6 #include "../../src/launch/launch_config.h"
7 
8 #include "core_utils.h"
9 #include "param_utils.h"
10 
11 using namespace rosmon::launch;
12 
13 TEST_CASE("basic", "[basic]")
14 {
15  LaunchConfig config;
16  config.parseString(R"EOF(
17  <launch>
18  </launch>
19  )EOF");
20 }
21 
22 TEST_CASE("basic: invalid XML", "[basic]")
23 {
25  <launch><abc>
26  </launch>
27  )EOF");
28 }
29 
30 TEST_CASE("basic: top-level attributes", "[basic]")
31 {
32  LaunchConfig config;
33  config.parseString(R"EOF(
34  <launch rosmon-name="my_name" rosmon-window-title="my_title">
35  </launch>
36  )EOF");
37 
38  CHECK(config.rosmonNodeName() == "my_name");
39  CHECK(config.windowTitle() == "my_title");
40 }
std::string rosmonNodeName() const
static void requireParsingException(const std::string &input)
Definition: core_utils.h:11
void parseString(const std::string &input, bool onlyArguments=false)
TEST_CASE("basic","[basic]")
Definition: test_basic.cpp:13
std::string windowTitle() const


rosmon_core
Author(s): Max Schwarz
autogenerated on Sat Jan 9 2021 03:35:43