Jon Test
C++ Unit Test Tool. Not for production -- sample code only
Loading...
Searching...
No Matches
Public Member Functions | List of all members
JonTest::Logger Class Referenceabstract

Interface for logging events while running tests. More...

#include <Logger.h>

Inheritance diagram for JonTest::Logger:
Inheritance graph
Collaboration diagram for JonTest::Logger:
Collaboration graph

Public Member Functions

virtual ~Logger ()
 Destructor – does nothing.
 
virtual void start ()=0
 Start of all testing.
 
virtual void startSuite (const std::string &suiteName)=0
 Start of test suite.
 
virtual void startCase (const std::string &suiteName, const std::string &caseName)=0
 Start of test case.
 
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.
 
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 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 endCase (const std::string &suiteName, const std::string &caseName, const bool pass)=0
 End of test case, with record pass or fail.
 
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 end (const Count &count)=0
 End of all testing, suitable to output.
 

Detailed Description

Interface for logging events while running tests.

Definition at line 17 of file Logger.h.

Constructor & Destructor Documentation

◆ ~Logger()

JonTest::Logger::~Logger ( )
virtual

Destructor – does nothing.

Definition at line 11 of file Logger.cpp.

Member Function Documentation

◆ end()

virtual void JonTest::Logger::end ( const Count count)
pure virtual

End of all testing, suitable to output.

Parameters
countCount of Test Cases run, and Test Cases failed

Implemented in JonTest::StreamLogger.

◆ endCase()

virtual void JonTest::Logger::endCase ( const std::string &  suiteName,
const std::string &  caseName,
const bool  pass 
)
pure virtual

End of test case, with record pass or fail.

Parameters
suiteNameName of test suite
caseNameName of test case
passtrue if passed, false if failed

Implemented in JonTest::StreamLogger.

◆ endSuite()

virtual void JonTest::Logger::endSuite ( const std::string &  suiteName,
const Count count 
)
pure virtual

End of test suite, with count of tests run and failed for that suite alone.

Parameters
suiteNameName of test suite
countCount of tests run and failed in this suite

Implemented in JonTest::StreamLogger.

◆ errorCase()

virtual void JonTest::Logger::errorCase ( const std::string &  suiteName,
const std::string &  caseName,
const std::string &  casePart,
const std::string &  message 
)
pure virtual

Unexpected error occurred during a part of the test case.

Parameters
suiteNameName of test suite
caseNameName of test case
casePartPart of the test case: setup, case, or teardown
messageError message

Implemented in JonTest::StreamLogger.

◆ exceptionCase()

virtual void JonTest::Logger::exceptionCase ( const std::string &  suiteName,
const std::string &  caseName,
const std::string &  casePart,
const std::exception &  unexpected 
)
pure virtual

Unexpected exception occurred during a part of the case.

Parameters
suiteNameName of test suite
caseNameName of test case
casePartPart of the test case: setup, case, or teardown
unexpectedUnexpected exception

Implemented in JonTest::StreamLogger.

◆ failCase()

virtual void JonTest::Logger::failCase ( const std::string &  suiteName,
const std::string &  caseName,
const std::string &  casePart,
const TestFailure failure 
)
pure virtual

Test failure occurred during a part of the case.

Parameters
suiteNameName of test suite
caseNameName of test case
casePartPart of the test case: setup, case, or teardown
failureTestFailure as recorded

Implemented in JonTest::StreamLogger.

◆ start()

virtual void JonTest::Logger::start ( )
pure virtual

Start of all testing.

Implemented in JonTest::StreamLogger.

◆ startCase()

virtual void JonTest::Logger::startCase ( const std::string &  suiteName,
const std::string &  caseName 
)
pure virtual

Start of test case.

Parameters
suiteNameName of test suite
caseNameName of test case

Implemented in JonTest::StreamLogger.

◆ startSuite()

virtual void JonTest::Logger::startSuite ( const std::string &  suiteName)
pure virtual

Start of test suite.

Parameters
suiteNameName of test suite

Implemented in JonTest::StreamLogger.


The documentation for this class was generated from the following files: