|
Jon Test
C++ Unit Test Tool. Not for production -- sample code only
|
Stream-based Logger for events while running tests. More...
#include <Logger.h>


Public Member Functions | |
| StreamLogger (std::ostream &out, bool verbose) | |
| Construct the Stream Logger to write to out with the given verbosity. | |
| virtual | ~StreamLogger () |
| Destructor – does nothing. | |
| virtual void | start () |
| Start of all testing. | |
| virtual void | startSuite (const std::string &suiteName) |
| Start of test suite. | |
| virtual void | startCase (const std::string &suiteName, const std::string &caseName) |
| Start of test case. | |
| virtual void | errorCase (const std::string &suiteName, const std::string &caseName, const std::string &casePart, const std::string &message) |
| Unexpected error occurred during a part of the test case. | |
| virtual void | failCase (const std::string &suiteName, const std::string &caseName, const std::string &casePart, const TestFailure &failure) |
| Test failure occurred during a part of the case. | |
| virtual void | exceptionCase (const std::string &suiteName, const std::string &caseName, const std::string &casePart, const std::exception &unexpected) |
| Unexpected exception occurred during a part of the case. | |
| virtual void | endCase (const std::string &suiteName, const std::string &caseName, const bool pass) |
| End of test case, with record pass or fail. | |
| virtual void | endSuite (const std::string &suiteName, const Count &count) |
| End of test suite, with count of tests run and failed for that suite alone. | |
| virtual void | end (const Count &count) |
| End of all testing, suitable to output. | |
Public Member Functions inherited from JonTest::Logger | |
| virtual | ~Logger () |
| Destructor – does nothing. | |
Protected Attributes | |
| std::ostream & | out |
| Stream to write to. | |
| const bool | verbose |
| Simple level of verbosity: true for all events, false for critical. | |
Stream-based Logger for events while running tests.
Test cases are counted as:
| JonTest::StreamLogger::StreamLogger | ( | std::ostream & | out, |
| bool | verbose | ||
| ) |
Construct the Stream Logger to write to out with the given verbosity.
| out | Stream to write to |
| verbose | Simple level of verbosity: true for all events, false for critical |
Definition at line 16 of file Logger.cpp.
|
virtual |
Destructor – does nothing.
Definition at line 25 of file Logger.cpp.
End of all testing, suitable to output.
| count | Count of Test Cases run, and Test Cases failed |
Implements JonTest::Logger.
Definition at line 117 of file Logger.cpp.
|
virtual |
End of test case, with record pass or fail.
| suiteName | Name of test suite |
| caseName | Name of test case |
| pass | true if passed, false if failed |
Implements JonTest::Logger.
Definition at line 92 of file Logger.cpp.
End of test suite, with count of tests run and failed for that suite alone.
| suiteName | Name of test suite |
| count | Count of tests run and failed in this suite |
Implements JonTest::Logger.
Definition at line 105 of file Logger.cpp.
|
virtual |
Unexpected error occurred during a part of the test case.
| suiteName | Name of test suite |
| caseName | Name of test case |
| casePart | Part of the test case: setup, case, or teardown |
| message | Error message |
Implements JonTest::Logger.
Definition at line 59 of file Logger.cpp.
|
virtual |
Unexpected exception occurred during a part of the case.
Implements JonTest::Logger.
Definition at line 81 of file Logger.cpp.
|
virtual |
Test failure occurred during a part of the case.
| suiteName | Name of test suite |
| caseName | Name of test case |
| casePart | Part of the test case: setup, case, or teardown |
| failure | TestFailure as recorded |
Implements JonTest::Logger.
Definition at line 70 of file Logger.cpp.
|
virtual |
|
virtual |
Start of test case.
| suiteName | Name of test suite |
| caseName | Name of test case |
Implements JonTest::Logger.
Definition at line 48 of file Logger.cpp.
Start of test suite.
| suiteName | Name of test suite |
Implements JonTest::Logger.
Definition at line 38 of file Logger.cpp.
|
protected |