A class to run a subset of unit tests.
More...
#include <multi_runner.h>
A class to run a subset of unit tests.
Definition at line 234 of file multi_runner.h.
◆ MessageType
◆ MultiRunnerChild() [1/2]
| xrpl::test::MultiRunnerChild::MultiRunnerChild |
( |
MultiRunnerChild const & | | ) |
|
|
delete |
◆ MultiRunnerChild() [2/2]
| xrpl::test::MultiRunnerChild::MultiRunnerChild |
( |
std::size_t | numJobs, |
|
|
bool | quiet, |
|
|
bool | printLog ) |
◆ ~MultiRunnerChild()
| xrpl::test::MultiRunnerChild::~MultiRunnerChild |
( |
| ) |
|
|
override |
◆ operator=()
◆ tests()
| std::size_t xrpl::test::MultiRunnerChild::tests |
( |
| ) |
const |
|
nodiscard |
◆ suites()
| std::size_t xrpl::test::MultiRunnerChild::suites |
( |
| ) |
const |
|
nodiscard |
◆ addFailures()
| void xrpl::test::MultiRunnerChild::addFailures |
( |
std::size_t | failures | ) |
|
◆ runMulti()
template<class Pred>
| bool xrpl::test::MultiRunnerChild::runMulti |
( |
Pred | pred | ) |
|
◆ onSuiteBegin()
◆ onSuiteEnd()
| void xrpl::test::MultiRunnerChild::onSuiteEnd |
( |
| ) |
|
|
overrideprivatevirtual |
◆ onCaseBegin()
| void xrpl::test::MultiRunnerChild::onCaseBegin |
( |
std::string const & | | ) |
|
|
overrideprivatevirtual |
◆ onCaseEnd()
| void xrpl::test::MultiRunnerChild::onCaseEnd |
( |
| ) |
|
|
overrideprivatevirtual |
◆ onPass()
| void xrpl::test::MultiRunnerChild::onPass |
( |
| ) |
|
|
overrideprivatevirtual |
◆ onFail()
| void xrpl::test::MultiRunnerChild::onFail |
( |
std::string const & | | ) |
|
|
overrideprivatevirtual |
◆ onLog()
| void xrpl::test::MultiRunnerChild::onLog |
( |
std::string const & | | ) |
|
|
overrideprivatevirtual |
◆ arg() [1/2]
| void beast::unit_test::Runner::arg |
( |
std::string const & | s | ) |
|
|
inherited |
Set the argument string.
The argument string is available to suites and allows for customization of the test. Each suite defines its own syntax for the argument string. The same argument is passed to all suites.
Definition at line 44 of file runner.h.
◆ arg() [2/2]
| std::string const & beast::unit_test::Runner::arg |
( |
| ) |
const |
|
nodiscardinherited |
Returns the argument string.
Definition at line 51 of file runner.h.
◆ run() [1/2]
template<class>
| bool beast::unit_test::Runner::run |
( |
SuiteInfo const & | s | ) |
|
|
inherited |
Run the specified suite.
- Returns
- true if any conditions failed.
Definition at line 170 of file runner.h.
◆ run() [2/2]
template<class FwdIter>
| bool beast::unit_test::Runner::run |
( |
FwdIter | first, |
|
|
FwdIter | last ) |
|
inherited |
Run a sequence of suites.
The expression FwdIter::value_type must be convertible to SuiteInfo.
- Returns
- true if any conditions failed.
Definition at line 186 of file runner.h.
◆ runIf()
template<class FwdIter, class Pred>
| bool beast::unit_test::Runner::runIf |
( |
FwdIter | first, |
|
|
FwdIter | last, |
|
|
Pred | pred = Pred{} ) |
|
inherited |
Conditionally run a sequence of suites.
pred will be called as:
bool pred(SuiteInfo const&);
- Returns
- true if any conditions failed.
Definition at line 196 of file runner.h.
◆ runEach()
template<class SequenceContainer>
| bool beast::unit_test::Runner::runEach |
( |
SequenceContainer const & | c | ) |
|
|
inherited |
Run all suites in a container.
- Returns
- true if any conditions failed.
Definition at line 209 of file runner.h.
◆ runEachIf()
template<class SequenceContainer, class Pred>
| bool beast::unit_test::Runner::runEachIf |
( |
SequenceContainer const & | c, |
|
|
Pred | pred = Pred{} ) |
|
inherited |
Conditionally run suites in a container.
pred will be called as:
bool pred(SuiteInfo const&);
- Returns
- true if any conditions failed.
Definition at line 219 of file runner.h.
◆ testcase()
template<class>
| void beast::unit_test::Runner::testcase |
( |
std::string const & | name | ) |
|
|
privateinherited |
◆ pass()
template<class>
| void beast::unit_test::Runner::pass |
( |
| ) |
|
|
privateinherited |
◆ fail()
template<class>
| void beast::unit_test::Runner::fail |
( |
std::string const & | reason | ) |
|
|
privateinherited |
◆ log()
template<class>
| void beast::unit_test::Runner::log |
( |
std::string const & | s | ) |
|
|
privateinherited |
◆ messageQueueSend()
◆ checkoutTestIndex()
◆ checkoutJobIndex()
◆ anyFailed()
◆ add()
◆ incKeepAliveCount()
◆ getKeepAliveCount()
◆ printResults()
◆ jobIndex_
◆ results_
◆ suiteResults_
◆ caseResults_
◆ numJobs_
◆ quiet_
| bool xrpl::test::MultiRunnerChild::quiet_ {false} |
|
private |
◆ printLog_
| bool xrpl::test::MultiRunnerChild::printLog_ {true} |
|
private |
◆ continueKeepAlive_
| std::atomic<bool> xrpl::test::MultiRunnerChild::continueKeepAlive_ {true} |
|
private |
◆ keepAliveThread_
| std::thread xrpl::test::MultiRunnerChild::keepAliveThread_ |
|
private |
◆ arg_
◆ default_
| bool beast::unit_test::Runner::default_ = false |
|
privateinherited |
◆ failed_
| bool beast::unit_test::Runner::failed_ = false |
|
privateinherited |
◆ cond_
| bool beast::unit_test::Runner::cond_ = false |
|
privateinherited |
◆ mutex_
◆ kSharedMemName
|
|
staticconstexprprivateinherited |
◆ kMessageQueueName
|
|
staticconstexprprivateinherited |
◆ inner_
◆ sharedMem_
◆ region_
◆ messageQueue_