Revision 706, 0.8 kB
(checked in by smidl, 15 years ago)
|
eol-native
|
-
Property svn:eol-style set to
native
|
Rev | Line | |
---|
[418] | 1 | #include "Config.h" |
---|
| 2 | #include "Test.h" |
---|
| 3 | #include "TestList.h" |
---|
| 4 | #include "TestResults.h" |
---|
| 5 | #include "AssertException.h" |
---|
| 6 | #include "MemoryOutStream.h" |
---|
| 7 | #include "ExecuteTest.h" |
---|
[435] | 8 | #include <cstdio> |
---|
[418] | 9 | |
---|
| 10 | #ifdef UNITTEST_POSIX |
---|
[477] | 11 | #include "Posix/SignalTranslator.h" |
---|
[418] | 12 | #endif |
---|
| 13 | |
---|
| 14 | namespace UnitTest { |
---|
| 15 | |
---|
[477] | 16 | TestList& Test::GetTestList() { |
---|
| 17 | static TestList s_list; |
---|
| 18 | return s_list; |
---|
[418] | 19 | } |
---|
| 20 | |
---|
[477] | 21 | Test::Test ( char const* testName, char const* suiteName, char const* filename, int lineNumber ) |
---|
| 22 | : m_details ( testName, suiteName, filename, lineNumber ) |
---|
| 23 | , next ( 0 ) |
---|
| 24 | , m_timeConstraintExempt ( false ) { |
---|
[418] | 25 | } |
---|
| 26 | |
---|
[477] | 27 | Test::~Test() { |
---|
[418] | 28 | } |
---|
| 29 | |
---|
[477] | 30 | void Test::Run() { |
---|
[435] | 31 | // made more chatty; presumes the only used test reporter is |
---|
| 32 | // TestReporterStdout |
---|
[477] | 33 | std::printf ( "running %s...\n", m_details.testName ); |
---|
[435] | 34 | |
---|
[477] | 35 | ExecuteTest ( *this, m_details ); |
---|
[418] | 36 | } |
---|
| 37 | |
---|
[477] | 38 | void Test::RunImpl() const { |
---|
[418] | 39 | } |
---|
| 40 | |
---|
| 41 | } |
---|