|
scsl 1.0.1
Shimmering Clarity Standard Library
|
A Report holds test run results. More...
#include <Report.h>
Public Member Functions | |
| Report () | |
| Construct a new Report, zeroed out. | |
| size_t | Failing () const |
| Failing returns the count of failed tests. | |
| size_t | Passing () const |
| The number of tests that have passed successfully. | |
| size_t | Total () const |
| The number of tests registered. | |
| void | Failed () |
| Report a test as having failed. | |
| void | Passed () |
| Report a test as having passed. | |
| void | AddTest (size_t testCount=0) |
| Register more tests in the report. | |
| void | Reset (size_t testCount=0) |
| Reset the internal state. | |
| void | Start () |
| Mark the start of test runs. | |
| void | End () |
| Mark the end of test runs. | |
| std::chrono::duration< double, std::milli > | Elapsed () const |
| Retrieve how long the tests took to run. | |
A Report holds test run results.
This is designed to work with SimpleSuite, but might be useful for other things.
| sctest::Report::Report | ( | ) |
Construct a new Report, zeroed out.
| void sctest::Report::AddTest | ( | size_t | testCount = 0 | ) |
Register more tests in the report.
This is used to track the total number of tests in the report.
| std::chrono::duration< double, std::milli > sctest::Report::Elapsed | ( | ) | const |
Retrieve how long the tests took to run.
This only makes sense to run after called to Start and End.
| void sctest::Report::End | ( | ) |
Mark the end of test runs.
This is used for tracking how long the tests took to complete.
| void sctest::Report::Failed | ( | ) |
Report a test as having failed.
| size_t sctest::Report::Failing | ( | ) | const |
Failing returns the count of failed tests.
If a test is run and expected to pass, but fails, it is marked as failed. If a test is expected to fail, but passes, it is marked as failed.
| void sctest::Report::Passed | ( | ) |
Report a test as having passed.
| size_t sctest::Report::Passing | ( | ) | const |
The number of tests that have passed successfully.
| void sctest::Report::Reset | ( | size_t | testCount = 0 | ) |
| void sctest::Report::Start | ( | ) |
Mark the start of test runs.
This is used for tracking how long the tests took to complete.
| size_t sctest::Report::Total | ( | ) | const |
The number of tests registered.