#include "boost/test/unit_test.hpp"
#include "art/Persistency/Provenance/PathSpec.h"
#include <cstddef>
#include <string>
#include <vector>
Go to the source code of this file.
#define BOOST_TEST_MODULE (PathSpec_t) |
BOOST_AUTO_TEST_CASE |
( |
parse_path_spec_t |
| ) |
|
Definition at line 12 of file PathSpec_t.cc.
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");
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)