All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
geometry_iterator_sbnd_test.cxx
Go to the documentation of this file.
1 /**
2  * @file geometry_iterator_sbnd_test.cxx
3  * @brief Unit test for geometry iterators on SBND detector
4  * @date June 6th, 2016
5  * @author petrillo@fnal.gov
6  *
7  * Usage: just run the executable.
8  * Boost unit testing environment keeps the arguments secret anyway.
9  */
10 
11 // Boost test libraries; defining this symbol tells boost somehow to generate
12 // a main() function; Boost is pulled in by geometry_boost_unit_test_base.h
13 #define BOOST_TEST_MODULE GeometryIteratorTestSBND
14 
15 // SBND libraries
17 
18 // LArSoft libraries
22 
23 //------------------------------------------------------------------------------
24 //--- The test environment
25 //---
26 
27 // we define here all the configuration that is needed;
28 // in the specific, the type of the channel mapping and a proper test name,
29 // used for output only; we use SBNDGeometryEnvironmentConfiguration
30 // as base class, that is already configured to use SBND geometry.
31 // We wrap it in testing::BoostCommandLineConfiguration<> so that it can learn
32 // the configuration file name from the command line.
35  sbnd::testing::SBNDGeometryEnvironmentConfiguration
36  <geo::ChannelMapSBNDAlg>
37  >
38 {
39  /// Constructor: overrides the application name; ignores command line
41  { SetApplicationName("GeometryIteratorUnitTest"); }
42 }; // class SBNDGeometryConfiguration
43 
44 /*
45  * Our fixture is based on GeometryTesterFixture, configured with the object
46  * above.
47  * It provides:
48  * - `Tester`, a configured instance of the test algorithm.
49  */
51  private testing::GeometryTesterEnvironment<SBNDGeometryConfiguration>
52 {
53  public:
55 
56  /// Constructor: initialize the tester with the Geometry from base class
58  { Tester.Setup(*Geometry()); }
59 
60 }; // class SBNDGeometryIteratorTestFixture
61 
62 
63 
64 //------------------------------------------------------------------------------
65 //--- The tests
66 //---
67 
69  (GeometryIteratorsSBND, SBNDGeometryIteratorTestFixture)
70 // BOOST_GLOBAL_FIXTURE(SBNDGeometryIteratorTestFixture);
71 
72 
73 BOOST_AUTO_TEST_CASE( AllTests )
74 {
75  Tester.Run();
76 } // BOOST_AUTO_TEST_CASE( AllTests )
77 
78 /*
79 BOOST_AUTO_TEST_CASE( CryostatIteratorsTest )
80 {
81  Tester.CryostatIteratorsTest();
82 } // BOOST_AUTO_TEST_CASE( CryostatIteratorsTest )
83 
84 
85 
86 BOOST_AUTO_TEST_CASE( TPCIteratorsTest )
87 {
88  Tester.TPCIteratorsTest();
89 } // BOOST_AUTO_TEST_CASE( TPCIteratorsTest )
90 
91 
92 
93 BOOST_AUTO_TEST_CASE( PlaneIteratorsTest )
94 {
95  Tester.PlaneIteratorsTest();
96 } // BOOST_AUTO_TEST_CASE( PlaneIteratorsTest )
97 
98 
99 
100 BOOST_AUTO_TEST_CASE( WireIteratorsTest )
101 {
102  Tester.WireIteratorsTest();
103 } // BOOST_AUTO_TEST_CASE( WireIteratorsTest )
104 */
105 
106 BOOST_AUTO_TEST_SUITE_END()
107 
BOOST_AUTO_TEST_CASE(AllTests)
Class for objects initializing SBND geometry.
void SetApplicationName(std::string name)
Sets the name of the application.
BOOST_FIXTURE_TEST_SUITE(GeometryIteratorsIcarus, IcarusGeometryIteratorTestFixture) BOOST_AUTO_TEST_CASE(AllTests)
virtual void Setup(geo::GeometryCore const &new_geo)
Algorithm set up.
SBNDGeometryIteratorTestFixture()
Constructor: initialize the tester with the Geometry from base class.
Tests the correct iteration of the geo::Geometry iterators.
Class holding a configuration for a Boost test fixture.
Environment for a geometry test.
Base class for tests using Boost unit test library.
fhicl::ParameterSet TesterParameters() const
Returns the configuration of the main test (undefined if no main test)
SBNDGeometryConfiguration()
Constructor: overrides the application name; ignores command line.
geo::GeometryCore const * Geometry() const
Returns a pointer to the geometry.
Channel mapping for SBND.