|
xrpld
|
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 (SuiteInfo 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 | runIf (FwdIter first, FwdIter last, Pred pred=Pred{}) |
| Conditionally run a sequence of suites. | |
| template<class SequenceContainer> | |
| bool | runEach (SequenceContainer const &c) |
| Run all suites in a container. | |
| template<class SequenceContainer, class Pred> | |
| bool | runEachIf (SequenceContainer const &c, Pred pred=Pred{}) |
| Conditionally run suites in a container. | |
Private Member Functions | |
| void | onSuiteBegin (SuiteInfo const &info) override |
| Called when a new suite starts. | |
| void | onSuiteEnd () override |
| Called when a suite ends. | |
| void | onCaseBegin (std::string const &name) override |
| Called when a new case starts. | |
| void | onCaseEnd () override |
| Called when a new case ends. | |
| void | onPass () override |
| Called for each passing condition. | |
| void | onFail (std::string const &reason) override |
| Called for each failing condition. | |
| void | onLog (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 | results_ |
| SuiteResults | suite_ |
| CaseResults | 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 13 of file recorder.h.
|
default |
|
nodiscard |
Returns a report with the results of all completed suites.
Definition at line 25 of file recorder.h.
|
overrideprivatevirtual |
Called when a new suite starts.
Reimplemented from beast::unit_test::Runner.
Definition at line 32 of file recorder.h.
|
overrideprivatevirtual |
Called when a suite ends.
Reimplemented from beast::unit_test::Runner.
Definition at line 38 of file recorder.h.
|
overrideprivatevirtual |
Called when a new case starts.
Reimplemented from beast::unit_test::Runner.
Definition at line 44 of file recorder.h.
|
overrideprivatevirtual |
Called when a new case ends.
Reimplemented from beast::unit_test::Runner.
Definition at line 50 of file recorder.h.
|
overrideprivatevirtual |
Called for each passing condition.
Reimplemented from beast::unit_test::Runner.
Definition at line 57 of file recorder.h.
|
overrideprivatevirtual |
Called for each failing condition.
Reimplemented from beast::unit_test::Runner.
Definition at line 63 of file recorder.h.
|
overrideprivatevirtual |
Called when a test logs output.
Reimplemented from beast::unit_test::Runner.
Definition at line 69 of file recorder.h.
|
inherited |
|
nodiscardinherited |
|
inherited |
|
inherited |
|
inherited |
Conditionally run a sequence of suites.
pred will be called as:
|
inherited |
|
inherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
private |
Definition at line 16 of file recorder.h.
|
private |
Definition at line 17 of file recorder.h.
|
private |
Definition at line 18 of file recorder.h.
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |