1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
#ifndef cppunit_testshltestresult_h
#define cppunit_testshltestresult_h
#include <map>
#include <testshl/result/TestResult.h>
#include <testshl/result/TestResultCollector.h>
#include <ostream>
#include "testshl/getopt.hxx"
class Outputter;
namespace CppUnit {
class SourceLine;
class Exception;
class Test;
struct ltstr
{
bool operator()(const CppUnit::Test* p1, const CppUnit::Test* p2) const
{
return p1 < p2;
}
};
typedef std::map<CppUnit::Test*, bool, ltstr> TestPtrList;
/*! \brief Holds printable test result (DEPRECATED).
* \ingroup TrackingTestExecution
*
* deprecated Use class TextTestProgressListener and TextOutputter instead.
*/
class CPPUNIT_API testshlTestResult : public TestResult
/* ,public TestResultCollector*/
{
GetOpt & m_aOptions;
// OptionHelper m_aOptionHelper;
TestResultCollector m_aResulter;
public:
testshlTestResult(GetOpt & _aOptions);
virtual ~testshlTestResult();
// virtual void addFailure( const TestFailure &failure );
// virtual void startTest( Test *test );
// virtual void endTest( Test *test );
virtual void print( Outputter &stream );
protected:
virtual void printHeader( Outputter &stream );
void printLines(Outputter &stream, HashMap & _aJobList);
void printFailedTests(Outputter &stream, TestPtrList &aFailedTests);
void printTestLines(Outputter &stream, TestPtrList &aFailedTests);
void printUnknownLines(Outputter &stream, HashMap & _aJobList);
virtual void printTestLine( Outputter &stream, Test* pTest, std::string const& _sNodeName, std::string const& _sInfo);
virtual void printFailureLine( Outputter &stream, TestFailure* pFailure, std::string const& _sNodeName );
virtual void printUnknownLine( Outputter &stream, std::string const& _sTestName);
};
/** insertion operator for easy output */
Outputter &operator <<( Outputter &stream,
testshlTestResult &result );
} // namespace CppUnit
#endif // CPPUNIT_testshlTESTRESULT_H
|