Revision 435, 0.8 kB
(checked in by vbarta, 15 years ago)
|
dislaying test name (to standard output) before running each test
|
Line | |
---|
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" |
---|
8 | #include <cstdio> |
---|
9 | |
---|
10 | #ifdef UNITTEST_POSIX |
---|
11 | #include "Posix/SignalTranslator.h" |
---|
12 | #endif |
---|
13 | |
---|
14 | namespace UnitTest { |
---|
15 | |
---|
16 | TestList& Test::GetTestList() |
---|
17 | { |
---|
18 | static TestList s_list; |
---|
19 | return s_list; |
---|
20 | } |
---|
21 | |
---|
22 | Test::Test(char const* testName, char const* suiteName, char const* filename, int lineNumber) |
---|
23 | : m_details(testName, suiteName, filename, lineNumber) |
---|
24 | , next(0) |
---|
25 | , m_timeConstraintExempt(false) |
---|
26 | { |
---|
27 | } |
---|
28 | |
---|
29 | Test::~Test() |
---|
30 | { |
---|
31 | } |
---|
32 | |
---|
33 | void Test::Run() |
---|
34 | { |
---|
35 | // made more chatty; presumes the only used test reporter is |
---|
36 | // TestReporterStdout |
---|
37 | std::printf("running %s...\n", m_details.testName); |
---|
38 | |
---|
39 | ExecuteTest(*this, m_details); |
---|
40 | } |
---|
41 | |
---|
42 | void Test::RunImpl() const |
---|
43 | { |
---|
44 | } |
---|
45 | |
---|
46 | } |
---|