LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
boost_unit_test_base.h
Go to the documentation of this file.
1 
22 #ifndef TEST_BOOST_UNIT_TEST_BASE_H
23 #define TEST_BOOST_UNIT_TEST_BASE_H
24 
25 // LArSoft libraries
27 
28 // Boost libraries
29 #include <cetlib/quiet_unit_test.hpp> // framework::master_test_suite()
30 
31 // C/C++ standard libraries
32 #include <string>
33 
34 
35 namespace testing {
36 
52  template <typename CONFIGURATIONCLASS>
53  struct BoostCommandLineConfiguration: public CONFIGURATIONCLASS {
54 
55  using Base_t = CONFIGURATIONCLASS;
56 
60 
62  BoostCommandLineConfiguration(std::string name): Base_t(name)
64 
65  protected:
66 
69  {
70  Base_t::ParseCommandLine(
71  boost::unit_test::framework::master_test_suite().argc,
72  boost::unit_test::framework::master_test_suite().argv
73  );
74  }
75 
76  }; // class BoostCommandLineConfiguration<>
77 
78 
79 } // namespace testing
80 
81 #endif // TEST_BOOST_UNIT_TEST_BASE_H
LArSoft test utilities.
BoostCommandLineConfiguration()
Default constructor; this is what is used in Boost unit test.
Class holding a configuration for a Boost test fixture.
BoostCommandLineConfiguration(std::string name)
Constructor; accepts the name as parameter.
void ParseCommandLineFromBoost()
Parses arguments as delivered by Boost.
Base class for unit tests using FHiCL configuration.