34 out <<
"Beginning All Test Suites" << std::endl;
39 const std::string& suiteName
44 out <<
"Beginning Suite: " << suiteName <<
"\n";
49 const std::string& suiteName,
55 out <<
"\t" << suiteName <<
":" <<
caseName <<
": start" <<
"\n";
60 const std::string& suiteName,
63 const std::string& message
67 <<
" " << message <<
"\n";
71 const std::string& suiteName,
78 <<
" FAILED: " <<
failure.what() <<
"\n";
82 const std::string& suiteName,
89 <<
" UNEXPECTED EXCEPTION: " <<
unexpected.what() <<
"\n";
93 const std::string& suiteName,
100 out <<
"\t" << suiteName <<
":" <<
caseName <<
": done "
101 << (
pass ?
"passed" :
"FAILED") <<
"\n";
106 const std::string& suiteName,
112 out <<
"Suite Complete: " << suiteName <<
"\n"
113 <<
"\tRun: " << count.
count <<
"\t Fails: " << count.
fails <<
"\n\n";
121 out <<
"Tests Complete:\t\tRun: " << count.
count <<
"\t\tFails: " << count.
fails << std::endl;
Count of tests run, and fails.
int fails
Number of tests that have failed.
int count
Number of tests that have been run.
virtual ~Logger()
Destructor – does nothing.
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.
StreamLogger(std::ostream &out, bool verbose)
Construct the Stream Logger to write to out with the given verbosity.
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.
Defines and runs a single Test Case within a Test Suite.
Exception thrown when a test fails an assert and should fail (unless wrapped in expectedFailure()).