1#ifndef JON_TEST_LOGGER_H
2#define JON_TEST_LOGGER_H
28 const std::string& suiteName
33 const std::string& suiteName,
34 const std::string& caseName
39 const std::string& suiteName,
40 const std::string& caseName,
41 const std::string& casePart,
42 const std::string& message
47 const std::string& suiteName,
48 const std::string& caseName,
49 const std::string& casePart,
55 const std::string& suiteName,
56 const std::string& caseName,
57 const std::string& casePart,
58 const std::exception& unexpected
63 const std::string& suiteName,
64 const std::string& caseName,
70 const std::string& suiteName,
108 virtual void start();
111 const std::string& suiteName
115 const std::string& suiteName,
116 const std::string& caseName
120 const std::string& suiteName,
121 const std::string& caseName,
122 const std::string& casePart,
123 const std::string& message
127 const std::string& suiteName,
128 const std::string& caseName,
129 const std::string& casePart,
135 const std::string& suiteName,
136 const std::string& caseName,
137 const std::string& casePart,
138 const std::exception& unexpected
142 const std::string& suiteName,
143 const std::string& caseName,
148 const std::string& suiteName,
Count of tests run, and fails.
Interface for logging events while running tests.
virtual void exceptionCase(const std::string &suiteName, const std::string &caseName, const std::string &casePart, const std::exception &unexpected)=0
Unexpected exception occurred during a part of the case.
virtual void end(const Count &count)=0
End of all testing, suitable to output.
virtual void startCase(const std::string &suiteName, const std::string &caseName)=0
Start of test case.
virtual void failCase(const std::string &suiteName, const std::string &caseName, const std::string &casePart, const TestFailure &failure)=0
Test failure occurred during a part of the case.
virtual void start()=0
Start of all testing.
virtual void endSuite(const std::string &suiteName, const Count &count)=0
End of test suite, with count of tests run and failed for that suite alone.
virtual void startSuite(const std::string &suiteName)=0
Start of test suite.
virtual void endCase(const std::string &suiteName, const std::string &caseName, const bool pass)=0
End of test case, with record pass or fail.
virtual ~Logger()
Destructor – does nothing.
virtual void errorCase(const std::string &suiteName, const std::string &caseName, const std::string &casePart, const std::string &message)=0
Unexpected error occurred during a part of the test case.
Stream-based Logger for events while running tests.
virtual void end(const Count &count)
End of all testing, suitable to output.
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.
const bool verbose
Simple level of verbosity: true for all events, false for critical.
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 start()
Start of all testing.
virtual ~StreamLogger()
Destructor – does nothing.
virtual void startCase(const std::string &suiteName, const std::string &caseName)
Start of test case.
virtual void startSuite(const std::string &suiteName)
Start of test suite.
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 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.
std::ostream & out
Stream to write to.
virtual void endCase(const std::string &suiteName, const std::string &caseName, const bool pass)
End of test case, with record pass or fail.
Exception thrown when a test fails an assert and should fail (unless wrapped in expectedFailure()).