root/library/tests/unittest-cpp/Test.cpp @ 435

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
14namespace UnitTest {
15
16TestList& Test::GetTestList()
17{
18    static TestList s_list;
19    return s_list;
20}
21
22Test::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
29Test::~Test()
30{
31}
32
33void 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
42void Test::RunImpl() const
43{
44}
45
46}
Note: See TracBrowser for help on using the browser.