Belle II Software development
TestWithGearbox Class Reference

This class provides a test fixture managing the opening and closing of the Gearbox with the default geometry file. More...

#include <TestHelpers.h>

Inheritance diagram for TestWithGearbox:
TrackFindingCDCTestWithTopology DISABLED_Long_TrackFindingCDCTestWithTopology TrackFindingCDCTestWithSimpleSimulation SecondaryWireNeighborhoodTest TrackFindingCDCTestRootification< T >

Static Public Member Functions

static void SetUpTestCase ()
 Sets up the Gearbox once for all test in this TestCase.
 
static void TearDownTestCase ()
 Closes the Gearbox once for all test in this TestCase.
 

Detailed Description

This class provides a test fixture managing the opening and closing of the Gearbox with the default geometry file.

Use like

TEST_F(TestWithGearBox, MyTest)
{
}

Definition at line 44 of file TestHelpers.h.

Member Function Documentation

◆ SetUpTestCase()

void SetUpTestCase ( )
static

Sets up the Gearbox once for all test in this TestCase.

Definition at line 24 of file TestHelpers.cc.

25{
26 //Setup the gearbox
27 Gearbox& gearbox = Gearbox::getInstance();
28
29 std::vector<std::string> backends;
30 backends.emplace_back("file:");
31 gearbox.setBackends(backends);
32
33 B2INFO("Start open gearbox.");
34 gearbox.open("geometry/Belle2.xml");
35 B2INFO("Finished open gearbox.");
36}
static Gearbox & getInstance()
Return reference to the Gearbox instance.
Definition: Gearbox.cc:81

◆ TearDownTestCase()

void TearDownTestCase ( )
static

Closes the Gearbox once for all test in this TestCase.

Definition at line 38 of file TestHelpers.cc.

39{
40 Gearbox& gearbox = Gearbox::getInstance();
41 gearbox.close();
42}

The documentation for this class was generated from the following files: