Functions
parse_path_spec_t.cpp File Reference
#include "art/Framework/Core/detail/parse_path_spec.h"
#include <cassert>
#include <cstddef>
#include <string>
#include <vector>

Go to the source code of this file.

Functions

void test_remove_whitespace ()
 
void test_parse_path_spec ()
 
int main ()
 

Function Documentation

int main ( void  )

Definition at line 45 of file parse_path_spec_t.cpp.

46 {
49 }
void test_parse_path_spec()
void test_remove_whitespace()
void test_parse_path_spec ( )

Definition at line 19 of file parse_path_spec_t.cpp.

20 {
21  std::vector<std::string> paths;
22  paths.push_back("a:p1");
23  paths.push_back("b:p2");
24  paths.push_back(" c");
25  paths.push_back("ddd\t:p3");
26  paths.push_back("eee: p4 ");
27 
28  std::vector<std::pair<std::string, std::string>> parsed(paths.size());
29  for (size_t i = 0; i < paths.size(); ++i)
30  art::detail::parse_path_spec(paths[i], parsed[i]);
31 
32  assert(parsed[0].first == "a");
33  assert(parsed[0].second == "p1");
34  assert(parsed[1].first == "b");
35  assert(parsed[1].second == "p2");
36  assert(parsed[2].first == "");
37  assert(parsed[2].second == "c");
38  assert(parsed[3].first == "ddd");
39  assert(parsed[3].second == "p3");
40  assert(parsed[4].first == "eee");
41  assert(parsed[4].second == "p4");
42 }
void parse_path_spec(std::string path_spec, std::pair< std::string, std::string > &output)
second_as<> second
Type of time stored in seconds, in double precision.
Definition: spacetime.h:85
void test_remove_whitespace ( )

Definition at line 9 of file parse_path_spec_t.cpp.

10 {
11  std::string a("noblanks");
12  std::string b("\t no blanks \t");
13 
15  assert(a == b);
16 }
std::string string
Definition: nybbler.cc:12
void remove_whitespace(std::string &)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
static bool * b
Definition: config.cpp:1043