PlasCom2  1.0
XPACC Multi-physics simluation application
ProfilerTest.H
Go to the documentation of this file.
1 #include "Testing.H"
7 #include "TestingProgram.H"
8 
9 namespace ix { namespace profiler {
10 
13 
14  // The basic overaching test object for the profiler
15  class testmanager : public TestManagerType
16  {
17  protected:
18  TestGlobalType *driverProgram;
19  public:
21  testmanager() : TestManagerType() {
22  driverProgram = NULL;
24 #ifdef USE_PAPI
25  AddTest("PAPI",&testmanager::Test__PAPI);
26 #endif
27  };
28  void SetDriverProgram(TestGlobalType *inProgram){driverProgram = inProgram;};
29  void Test__BasicTimer(test::results &result);
30 #ifdef USE_PAPI
31  void Test__PAPI(test::results &result);
32 #endif
33  void AddTest(const std::string &testName,SuperTestFunction TestFunction)
34  {
35  TestFunctionType BaseTestFunction = static_cast<TestFunctionType>(TestFunction);
36  test::manager<test::results>::AddTest(testName,BaseTestFunction);
37  }
38  };
39 
40  };
41 };
Implements a program object for testing.
Defines MPI-specific parallel global and program classes.
void SetDriverProgram(TestGlobalType *inProgram)
Definition: ProfilerTest.H:28
void(manager::* TestFunctionType)(test::results &)
Definition: Testing.H:88
test::Global TestGlobalType
Definition: ProfilerTest.H:12
void AddTest(const std::string &testName, SuperTestFunction TestFunction)
Definition: ProfilerTest.H:33
Encapsulating class for collections of test results.
Definition: Testing.H:18
test::manager< test::results > TestManagerType
Definition: ProfilerTest.H:11
void Test__BasicTimer(test::results &result)
Definition: TestProfiler.C:136
Testing constructs for unit testing.
virtual void AddTest(const std::string &testName, TestFunctionType TestFunc)
Add a test.
Definition: Testing.H:123
TestGlobalType * driverProgram
Definition: ProfilerTest.H:18
Base global object.
Definition: Global.H:25
void(testmanager::* SuperTestFunction)(test::results &)
Definition: ProfilerTest.H:20