modm API documentation
|
#include <unittest/reporter.hpp>
Public Member Functions | |
Reporter (modm::IODevice &device) | |
Constructor. More... | |
void | nextTestSuite (modm::accessor::Flash< char > name) |
Switch to the next test suite. More... | |
void | nextTestFunction (modm::accessor::Flash< char > name) |
Switch to the next test function. More... | |
void | reportPass () |
Report a passed test. More... | |
modm::IOStream & | reportFailure (unsigned int lineNumber) |
Reported a failed test. More... | |
uint8_t | printSummary () |
Writes a summary of all the tests. More... | |
Used to generate the visible output.
unittest::Reporter::Reporter | ( | modm::IODevice & | device | ) |
Constructor.
device | IODevice used for printing |
void unittest::Reporter::nextTestFunction | ( | modm::accessor::Flash< char > | name | ) |
Switch to the next test function.
name | Name of the test function |
void unittest::Reporter::nextTestSuite | ( | modm::accessor::Flash< char > | name | ) |
Switch to the next test suite.
name | Name of the test suite |
uint8_t unittest::Reporter::printSummary | ( | ) |
Writes a summary of all the tests.
Basically the total number of failed and passed tests and then 'OK' if there was no failure or 'FAIL' otherwise.
modm::IOStream & unittest::Reporter::reportFailure | ( | unsigned int | lineNumber | ) |
Reported a failed test.
Generates a basic failure message, the returned stream can then be used to write some more specific information about the failure.
void unittest::Reporter::reportPass | ( | ) |
Report a passed test.
Doesn't generate any output, but increments the number of passed tests