Macros | Functions
test_suite.cc File Reference
#include "boost/test/unit_test.hpp"
#include "cetlib/filepath_maker.h"
#include "fhiclcpp/ParameterSet.h"
#include "fhiclcpp/test/boost_test_print_pset.h"
#include <fstream>
#include <string>

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   (document test)
 

Functions

void readFile (string fileName, string &content)
 
 BOOST_AUTO_TEST_CASE (doc)
 

Macro Definition Documentation

#define BOOST_TEST_MODULE   (document test)

Definition at line 1 of file test_suite.cc.

Function Documentation

BOOST_AUTO_TEST_CASE ( doc  )

Definition at line 25 of file test_suite.cc.

26 {
27  cet::filepath_lookup_nonabsolute policy("FHICL_FILE_PATH");
28  auto const ps1 = ParameterSet::make(
29  boost::unit_test::framework::master_test_suite().argv[1], policy);
30  auto const ps2 = ParameterSet::make(ps1.to_string());
31  BOOST_TEST(ps1 == ps2);
32 
33  // Alternative representation.
34  auto const ps3 = ParameterSet::make(ps1.to_compact_string());
35  BOOST_TEST(ps1 == ps3);
36 }
unique_ptr< InputSource > make(ParameterSet const &conf, InputSourceDescription &desc)
void readFile ( string  fileName,
string content 
)

Definition at line 16 of file test_suite.cc.

17 {
18  ifstream in(fileName.c_str());
19  for (string line; getline(in, line);)
20  content.append(line).append("\n");
21 }
fileName
Definition: dumpTree.py:9
void line(double t, double *p, double &x, double &y, double &z)