|
xrpld
|
A class to run a subset of unit tests. More...
#include <multi_runner.h>


Public Member Functions | |
| MultiRunnerChild (MultiRunnerChild const &)=delete | |
| MultiRunnerChild & | operator= (MultiRunnerChild const &)=delete |
| MultiRunnerChild (std::size_t numJobs, bool quiet, bool printLog) | |
| ~MultiRunnerChild () override | |
| std::size_t | tests () const |
| std::size_t | suites () const |
| void | addFailures (std::size_t failures) |
| template<class Pred> | |
| bool | runMulti (Pred pred) |
| 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 Types | |
| enum | MessageType |
Private Member Functions | |
| void | onSuiteBegin (beast::unit_test::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) |
| void | messageQueueSend (MessageType mt, std::string const &s) |
| std::size_t | checkoutTestIndex () |
| std::size_t | checkoutJobIndex () |
| void | anyFailed (bool v) |
| void | add (Results const &r) |
| void | incKeepAliveCount () |
| std::size_t | getKeepAliveCount () |
| void | printResults (S &s) |
Private Attributes | |
| std::size_t | jobIndex_ |
| detail::Results | results_ |
| detail::SuiteResults | suiteResults_ |
| detail::CaseResults | caseResults_ |
| std::size_t | numJobs_ {0} |
| bool | quiet_ {false} |
| bool | printLog_ {true} |
| std::atomic< bool > | continueKeepAlive_ {true} |
| std::thread | keepAliveThread_ |
| std::string | arg_ |
| bool | default_ = false |
| bool | failed_ = false |
| bool | cond_ = false |
| std::recursive_mutex | mutex_ |
| Inner * | inner_ |
| boost::interprocess::shared_memory_object | sharedMem_ |
| boost::interprocess::mapped_region | region_ |
| std::unique_ptr< boost::interprocess::message_queue > | messageQueue_ |
Static Private Attributes | |
| static constexpr char const * | kSharedMemName |
| static constexpr char const * | kMessageQueueName |
A class to run a subset of unit tests.
Definition at line 241 of file multi_runner.h.
|
strongprotectedinherited |
Definition at line 153 of file multi_runner.h.
|
delete |
| xrpl::test::MultiRunnerChild::MultiRunnerChild | ( | std::size_t | numJobs, |
| bool | quiet, | ||
| bool | printLog ) |
Definition at line 478 of file multi_runner.cpp.
|
override |
Definition at line 511 of file multi_runner.cpp.
|
delete |
|
nodiscard |
Definition at line 523 of file multi_runner.cpp.
|
nodiscard |
Definition at line 529 of file multi_runner.cpp.
| void xrpl::test::MultiRunnerChild::addFailures | ( | std::size_t | failures | ) |
Definition at line 535 of file multi_runner.cpp.
| bool xrpl::test::MultiRunnerChild::runMulti | ( | Pred | pred | ) |
Definition at line 304 of file multi_runner.h.
|
overrideprivatevirtual |
Called when a new suite starts.
Reimplemented from beast::unit_test::Runner.
Definition at line 542 of file multi_runner.cpp.
|
overrideprivatevirtual |
Called when a suite ends.
Reimplemented from beast::unit_test::Runner.
Definition at line 549 of file multi_runner.cpp.
|
overrideprivatevirtual |
Called when a new case starts.
Reimplemented from beast::unit_test::Runner.
Definition at line 565 of file multi_runner.cpp.
|
overrideprivatevirtual |
Called when a new case ends.
Reimplemented from beast::unit_test::Runner.
Definition at line 580 of file multi_runner.cpp.
|
overrideprivatevirtual |
Called for each passing condition.
Reimplemented from beast::unit_test::Runner.
Definition at line 586 of file multi_runner.cpp.
|
overrideprivatevirtual |
Called for each failing condition.
Reimplemented from beast::unit_test::Runner.
Definition at line 592 of file multi_runner.cpp.
|
overrideprivatevirtual |
Called when a test logs output.
Reimplemented from beast::unit_test::Runner.
Definition at line 604 of file multi_runner.cpp.
|
inherited |
|
nodiscardinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
protectedinherited |
Definition at line 155 of file multi_runner.cpp.
|
inherited |
Definition at line 162 of file multi_runner.cpp.
|
inherited |
Definition at line 165 of file multi_runner.cpp.
|
inherited |
Definition at line 168 of file multi_runner.cpp.
|
inherited |
Definition at line 171 of file multi_runner.cpp.
|
inherited |
Definition at line 174 of file multi_runner.cpp.
|
inherited |
Definition at line 177 of file multi_runner.cpp.
|
inherited |
Definition at line 181 of file multi_runner.cpp.
|
private |
Definition at line 245 of file multi_runner.h.
|
private |
Definition at line 246 of file multi_runner.h.
|
private |
Definition at line 247 of file multi_runner.h.
|
private |
Definition at line 248 of file multi_runner.h.
|
private |
Definition at line 249 of file multi_runner.h.
|
private |
Definition at line 250 of file multi_runner.h.
|
private |
Definition at line 251 of file multi_runner.h.
|
private |
Definition at line 253 of file multi_runner.h.
|
private |
Definition at line 254 of file multi_runner.h.
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
staticconstexprprivateinherited |
Definition at line 139 of file multi_runner.h.
|
staticconstexprprivateinherited |
Definition at line 142 of file multi_runner.h.
|
privateinherited |
Definition at line 145 of file multi_runner.h.
|
privateinherited |
Definition at line 147 of file multi_runner.h.
|
privateinherited |
Definition at line 148 of file multi_runner.h.
|
protectedinherited |
Definition at line 151 of file multi_runner.h.