testTest.hh

Go to the documentation of this file.
1 
6 #ifndef testTest_hh
7 #define testTest_hh
8 
9 #include "basics/testcase.hh"
10 
11 namespace test {
12 
16  class ToTest : public TestCase {
17  public:
18  virtual ~ToTest() {}
19 
20  virtual void run() {
21  testit();
22  }
23 
25 
26  void testit() {
27  _test(true);
28  _succeed();
29  }
31  };
32 
33 } // namespace test
34 
35 #endif // testTest_hh
Base class for tests.
Definition: testcase.hh:92
Unit tests.
Definition: testcase.hh:66
void testit()
Definition: testTest.hh:26
#define _test(cond)
Tests if cond is true (test passed) or not (test failed)
Definition: testcase.hh:76
void _succeed()
Explicitly succeds a test.
Definition: testcase.hh:112
Simple test case to test TestCase.
Definition: testTest.hh:16
virtual ~ToTest()
Definition: testTest.hh:18
virtual void run()
Runs the tests. Must be overwritten by the specialization.
Definition: testTest.hh:20
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich