1 #define BOOST_TEST_MODULE (PathSpec_t) 2 #include "boost/test/unit_test.hpp" 10 BOOST_AUTO_TEST_SUITE(PathSpec_t)
14 std::vector<std::string> paths;
15 paths.push_back(
"a:p1");
16 paths.push_back(
"b:p2");
17 paths.push_back(
" c");
18 paths.push_back(
"ddd\t:p3");
19 paths.push_back(
"eee: p4 ");
21 std::vector<std::pair<std::string, std::string>> parsed(paths.size());
22 for (
size_t i = 0; i < paths.size(); ++i)
25 BOOST_TEST(parsed[0].first ==
"a");
26 BOOST_TEST(parsed[0].
second ==
"p1");
27 BOOST_TEST(parsed[1].first ==
"b");
28 BOOST_TEST(parsed[1].
second ==
"p2");
29 BOOST_TEST(parsed[2].first ==
"");
30 BOOST_TEST(parsed[2].
second ==
"c");
31 BOOST_TEST(parsed[3].first ==
"ddd");
32 BOOST_TEST(parsed[3].
second ==
"p3");
33 BOOST_TEST(parsed[4].first ==
"eee");
34 BOOST_TEST(parsed[4].
second ==
"p4");
37 BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(parse_path_spec_t)
second_as<> second
Type of time stored in seconds, in double precision.
std::pair< std::string, std::string > split_process_and_path_names(std::string path_spec)