|
rippled
|
A test runner that stores the results. More...
#include <recorder.h>


Public Member Functions | |
| recorder ()=default | |
| results const & | report () const |
| Returns a report with the results of all completed suites. | |
| void | arg (std::string const &s) |
| Set the argument string. | |
| std::string const & | arg () const |
| Returns the argument string. | |
| template<class = void> | |
| bool | run (suite_info const &s) |
| Run the specified suite. | |
| template<class FwdIter > | |
| bool | run (FwdIter first, FwdIter last) |
| Run a sequence of suites. | |
| template<class FwdIter , class Pred > | |
| bool | run_if (FwdIter first, FwdIter last, Pred pred=Pred{}) |
| Conditionally run a sequence of suites. | |
| template<class SequenceContainer > | |
| bool | run_each (SequenceContainer const &c) |
| Run all suites in a container. | |
| template<class SequenceContainer , class Pred > | |
| bool | run_each_if (SequenceContainer const &c, Pred pred=Pred{}) |
| Conditionally run suites in a container. | |
Private Member Functions | |
| virtual void | on_suite_begin (suite_info const &info) override |
| Called when a new suite starts. | |
| virtual void | on_suite_end () override |
| Called when a suite ends. | |
| virtual void | on_case_begin (std::string const &name) override |
| Called when a new case starts. | |
| virtual void | on_case_end () override |
| Called when a new case ends. | |
| virtual void | on_pass () override |
| Called for each passing condition. | |
| virtual void | on_fail (std::string const &reason) override |
| Called for each failing condition. | |
| virtual void | on_log (std::string const &s) override |
| Called when a test logs output. | |
| template<class = void> | |
| void | testcase (std::string const &name) |
| template<class = void> | |
| void | pass () |
| template<class = void> | |
| void | fail (std::string const &reason) |
| template<class = void> | |
| void | log (std::string const &s) |
Private Attributes | |
| results | m_results |
| suite_results | m_suite |
| case_results | m_case |
| std::string | arg_ |
| bool | default_ = false |
| bool | failed_ = false |
| bool | cond_ = false |
| std::recursive_mutex | mutex_ |
A test runner that stores the results.
Definition at line 15 of file recorder.h.
|
default |
| results const & beast::unit_test::recorder::report | ( | ) | const |
Returns a report with the results of all completed suites.
Definition at line 27 of file recorder.h.
|
overrideprivatevirtual |
Called when a new suite starts.
Reimplemented from beast::unit_test::runner.
Definition at line 34 of file recorder.h.
|
overrideprivatevirtual |
Called when a suite ends.
Reimplemented from beast::unit_test::runner.
Definition at line 40 of file recorder.h.
|
overrideprivatevirtual |
Called when a new case starts.
Reimplemented from beast::unit_test::runner.
Definition at line 46 of file recorder.h.
|
overrideprivatevirtual |
Called when a new case ends.
Reimplemented from beast::unit_test::runner.
Definition at line 52 of file recorder.h.
|
overrideprivatevirtual |
Called for each passing condition.
Reimplemented from beast::unit_test::runner.
Definition at line 59 of file recorder.h.
|
overrideprivatevirtual |
Called for each failing condition.
Reimplemented from beast::unit_test::runner.
Definition at line 65 of file recorder.h.
|
overrideprivatevirtual |
Called when a test logs output.
Reimplemented from beast::unit_test::runner.
Definition at line 71 of file recorder.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Run a sequence of suites.
The expression FwdIter::value_type must be convertible to suite_info.
true if any conditions failed.
|
inherited |
Conditionally run a sequence of suites.
pred will be called as:
true if any conditions failed.
|
inherited |
|
inherited |
Conditionally run suites in a container.
pred will be called as:
true if any conditions failed.
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
private |
Definition at line 18 of file recorder.h.
|
private |
Definition at line 19 of file recorder.h.
|
private |
Definition at line 20 of file recorder.h.
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |