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
◆ multi_runner_child() [1/2]
◆ multi_runner_child() [2/2]
| xrpl::test::multi_runner_child::multi_runner_child |
( |
std::size_t |
num_jobs, |
|
|
bool |
quiet, |
|
|
bool |
print_log |
|
) |
| |
◆ ~multi_runner_child()
| xrpl::test::multi_runner_child::~multi_runner_child |
( |
| ) |
|
◆ operator=()
◆ tests()
| std::size_t xrpl::test::multi_runner_child::tests |
( |
| ) |
const |
◆ suites()
| std::size_t xrpl::test::multi_runner_child::suites |
( |
| ) |
const |
◆ add_failures()
| void xrpl::test::multi_runner_child::add_failures |
( |
std::size_t |
failures | ) |
|
◆ run_multi()
template<class Pred >
| bool xrpl::test::multi_runner_child::run_multi |
( |
Pred |
pred | ) |
|
◆ on_suite_begin()
◆ on_suite_end()
| void xrpl::test::multi_runner_child::on_suite_end |
( |
| ) |
|
|
overrideprivatevirtual |
◆ on_case_begin()
| void xrpl::test::multi_runner_child::on_case_begin |
( |
std::string const & |
| ) |
|
|
overrideprivatevirtual |
◆ on_case_end()
| void xrpl::test::multi_runner_child::on_case_end |
( |
| ) |
|
|
overrideprivatevirtual |
◆ on_pass()
| void xrpl::test::multi_runner_child::on_pass |
( |
| ) |
|
|
overrideprivatevirtual |
◆ on_fail()
| void xrpl::test::multi_runner_child::on_fail |
( |
std::string const & |
| ) |
|
|
overrideprivatevirtual |
◆ on_log()
| void xrpl::test::multi_runner_child::on_log |
( |
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 45 of file runner.h.
◆ arg() [2/2]
| std::string const & beast::unit_test::runner::arg |
( |
| ) |
const |
|
inherited |
Returns the argument string.
Definition at line 52 of file runner.h.
◆ run() [1/2]
template<class >
| bool beast::unit_test::runner::run |
( |
suite_info const & |
s | ) |
|
|
inherited |
Run the specified suite.
- Returns
true if any conditions failed.
Definition at line 171 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 suite_info.
- Returns
true if any conditions failed.
Definition at line 187 of file runner.h.
◆ run_if()
template<class FwdIter , class Pred >
| bool beast::unit_test::runner::run_if |
( |
FwdIter |
first, |
|
|
FwdIter |
last, |
|
|
Pred |
pred = Pred{} |
|
) |
| |
|
inherited |
Conditionally run a sequence of suites.
pred will be called as:
bool pred(suite_info const&);
- Returns
true if any conditions failed.
Definition at line 197 of file runner.h.
◆ run_each()
template<class SequenceContainer >
| bool beast::unit_test::runner::run_each |
( |
SequenceContainer const & |
c | ) |
|
|
inherited |
Run all suites in a container.
- Returns
true if any conditions failed.
Definition at line 208 of file runner.h.
◆ run_each_if()
template<class SequenceContainer , class Pred >
| bool beast::unit_test::runner::run_each_if |
( |
SequenceContainer const & |
c, |
|
|
Pred |
pred = Pred{} |
|
) |
| |
|
inherited |
Conditionally run suites in a container.
pred will be called as:
bool pred(suite_info const&);
- Returns
true if any conditions failed.
Definition at line 218 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 |
◆ message_queue_send()
◆ checkout_test_index()
◆ checkout_job_index()
◆ any_failed() [1/2]
◆ any_failed() [2/2]
◆ add()
◆ inc_keep_alive_count()
◆ get_keep_alive_count()
◆ print_results()
◆ job_index_
◆ results_
◆ suite_results_
◆ case_results_
◆ num_jobs_
| std::size_t xrpl::test::multi_runner_child::num_jobs_ {0} |
|
private |
◆ quiet_
| bool xrpl::test::multi_runner_child::quiet_ {false} |
|
private |
◆ print_log_
| bool xrpl::test::multi_runner_child::print_log_ {true} |
|
private |
◆ continue_keep_alive_
| std::atomic<bool> xrpl::test::multi_runner_child::continue_keep_alive_ {true} |
|
private |
◆ keep_alive_thread_
| std::thread xrpl::test::multi_runner_child::keep_alive_thread_ |
|
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_
◆ shared_mem_name_
|
|
staticconstexprprivateinherited |
◆ message_queue_name_
|
|
staticconstexprprivateinherited |
◆ inner_
◆ shared_mem_
◆ region_
◆ message_queue_