#include <cxxtools/unit/reporter.h>
Public Member Functions | |
| virtual | ~Reporter () |
| Destructor. | |
| virtual void | reportStart (const TestContext &test)=0 |
| Start notification. | |
| virtual void | reportFinish (const TestContext &test)=0 |
| Finished notification. | |
| virtual void | reportMessage (const std::string &msg)=0 |
| Message notification. | |
| virtual void | reportSuccess (const TestContext &test)=0 |
| Success notification. | |
| virtual void | reportAssertion (const TestContext &test, const Assertion &a)=0 |
| Assertion notification. | |
| virtual void | reportException (const TestContext &test, const std::exception &ex)=0 |
| Exception notification. | |
| virtual void | reportError (const TestContext &test)=0 |
| Error notification. | |
Public Attributes | |
| Signal< Reporter & > | destroyed |
Protected Member Functions | |
| Reporter () | |
| Constructs a reporter. | |
| virtual void reportStart | ( | const TestContext & | test | ) | [pure virtual] |
This method is called when a test has started. Every test sends this signal at startup.
| test | The started test |
| virtual void reportFinish | ( | const TestContext & | test | ) | [pure virtual] |
This method is called when a test has finished. Every test sends this signal at its end no matter if it failed or succeeded.
| test | The finished test |
| virtual void reportMessage | ( | const std::string & | msg | ) | [pure virtual] |
This method is called when a test has produced an informational message.
| msg | The message |
| virtual void reportSuccess | ( | const TestContext & | test | ) | [pure virtual] |
This method is called when a test was successful.
| test | The succeeded test |
| virtual void reportAssertion | ( | const TestContext & | test, | |
| const Assertion & | a | |||
| ) | [pure virtual] |
This method is called when a an assertion failed during a test. an assertion fails when a user defined condition is not met.
| test | The failed test |
| virtual void reportException | ( | const TestContext & | test, | |
| const std::exception & | ex | |||
| ) | [pure virtual] |
This method is called when a an exception failed during a test. An exception usually means that an error occured that was even u nexpected in a test scenario
| test | The failed test |
| virtual void reportError | ( | const TestContext & | test | ) | [pure virtual] |
This method is called when a an unknown error occurs during a test.
| test | The failed test |