Macros | Functions
artapp_basicSourceOptions_t.cc File Reference
#include "boost/test/unit_test.hpp"
#include "art/Framework/Art/detail/fillSourceList.h"
#include <sstream>

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   (artapp basic source options)
 

Functions

 BOOST_AUTO_TEST_CASE (SourceListWithComments)
 

Macro Definition Documentation

#define BOOST_TEST_MODULE   (artapp basic source options)

Definition at line 1 of file artapp_basicSourceOptions_t.cc.

Function Documentation

BOOST_AUTO_TEST_CASE ( SourceListWithComments  )

Definition at line 10 of file artapp_basicSourceOptions_t.cc.

11 {
12  std::string const files{"f1.root\n"
13  "# This is a random comment\n"
14  "#\n"
15  "# f2.root\n"
16  "f3.root\n"
17  "f4#.root#something\n"
18  "f5.root# this file is sometimes problematic\n"
19  "f6.root\n"};
20 
21  std::istringstream is(files);
22  std::vector<std::string> slist;
23  art::detail::fillSourceList(is, slist);
24 
25  auto const ref = {"f1.root", "f3.root", "f4", "f5.root", "f6.root"};
26  BOOST_TEST(slist == ref, boost::test_tools::per_element{});
27 }
std::string string
Definition: nybbler.cc:12
void fillSourceList(std::istream &ifs, std::vector< std::string > &source_list)
list files
Definition: languages.py:9