| Revision 418, 0.7 kB
            (checked in by vbarta, 16 years ago) | 
        
          | 
#27: added UnitTest?++ to bdm sources, changed test_user_data to use it 
 | 
      
      
    | Line |  | 
|---|
| 1 | #ifndef UNITTEST_TESTRESULTS_H | 
|---|
| 2 | #define UNITTEST_TESTRESULTS_H | 
|---|
| 3 |  | 
|---|
| 4 | namespace UnitTest { | 
|---|
| 5 |  | 
|---|
| 6 | class TestReporter; | 
|---|
| 7 | class TestDetails; | 
|---|
| 8 |  | 
|---|
| 9 | class TestResults | 
|---|
| 10 | { | 
|---|
| 11 | public: | 
|---|
| 12 | explicit TestResults(TestReporter* reporter = 0); | 
|---|
| 13 |  | 
|---|
| 14 | void OnTestStart(TestDetails const& test); | 
|---|
| 15 | void OnTestFailure(TestDetails const& test, char const* failure); | 
|---|
| 16 | void OnTestFinish(TestDetails const& test, float secondsElapsed); | 
|---|
| 17 |  | 
|---|
| 18 | int GetTotalTestCount() const; | 
|---|
| 19 | int GetFailedTestCount() const; | 
|---|
| 20 | int GetFailureCount() const; | 
|---|
| 21 |  | 
|---|
| 22 | private: | 
|---|
| 23 | TestReporter* m_testReporter; | 
|---|
| 24 | int m_totalTestCount; | 
|---|
| 25 | int m_failedTestCount; | 
|---|
| 26 | int m_failureCount; | 
|---|
| 27 |  | 
|---|
| 28 | bool m_currentTestFailed; | 
|---|
| 29 |  | 
|---|
| 30 | TestResults(TestResults const&); | 
|---|
| 31 | TestResults& operator =(TestResults const&); | 
|---|
| 32 | }; | 
|---|
| 33 |  | 
|---|
| 34 | } | 
|---|
| 35 |  | 
|---|
| 36 | #endif | 
|---|