rippled
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions
beast::unit_test Namespace Reference

Namespaces

namespace  detail
 

Classes

class  amount
 Utility for producing nicely composed output of amounts with units. More...
 
class  case_results
 Holds a set of test condition outcomes in a testcase. More...
 
class  print_test
 A suite that prints the list of globally defined suites. More...
 
class  recorder
 A test runner that stores the results. More...
 
class  results
 Holds the results of running a set of testsuites. More...
 
class  runner
 Unit test runner interface. More...
 
class  selector
 
class  suite
 A testsuite class. More...
 
class  suite_info
 Associates a unit test type with metadata. More...
 
class  suite_list
 A container of test suites. More...
 
class  suite_results
 Holds the set of testcase results in a suite. More...
 
class  thread
 Replacement for std::thread that handles exceptions in unit tests. More...
 

Typedefs

using reporter = detail::reporter<>
 

Enumerations

enum  abort_t { no_abort_on_fail , abort_on_fail }
 

Functions

std::ostreamoperator<< (std::ostream &s, amount const &t)
 
suite_list const & global_suites ()
 Holds test suites registered during static initialization.
 
selector match_auto (std::string const &name)
 Returns a predicate that implements a smart matching rule.
 
selector match_all ()
 Return a predicate that matches all suites not marked manual.
 
selector match_suite (std::string const &name)
 Returns a predicate that matches a specific suite.
 
selector match_library (std::string const &name)
 Returns a predicate that matches all suites in a library.
 
template<class Suite >
suite_info make_suite_info (std::string name, std::string module, std::string library, bool manual, int priority)
 Convenience for producing suite_info for a given test type.
 
 BEAST_DEFINE_TESTSUITE_MANUAL (print, beast, beast)
 

Typedef Documentation

◆ reporter

Definition at line 255 of file reporter.h.

Enumeration Type Documentation

◆ abort_t

Enumerator
no_abort_on_fail 
abort_on_fail 

Definition at line 42 of file suite.h.

Function Documentation

◆ operator<<()

std::ostream & beast::unit_test::operator<< ( std::ostream s,
amount const &  t 
)

Definition at line 39 of file include/xrpl/beast/unit_test/amount.h.

◆ global_suites()

suite_list const & beast::unit_test::global_suites ( )

Holds test suites registered during static initialization.

Definition at line 41 of file global_suites.h.

◆ match_auto()

selector beast::unit_test::match_auto ( std::string const &  name)

Returns a predicate that implements a smart matching rule.

The predicate checks the suite, module, and library fields of the suite_info in that order. When it finds a match, it changes modes depending on what was found:

If a suite is matched first, then only the suite is selected. The
suite may be marked manual.

If a module is matched first, then only suites from that module
and library not marked manual are selected from then on.

If a library is matched first, then only suites from that library
not marked manual are selected from then on.

Definition at line 142 of file match.h.

◆ match_all()

selector beast::unit_test::match_all ( )

Return a predicate that matches all suites not marked manual.

Definition at line 149 of file match.h.

◆ match_suite()

selector beast::unit_test::match_suite ( std::string const &  name)

Returns a predicate that matches a specific suite.

Definition at line 156 of file match.h.

◆ match_library()

selector beast::unit_test::match_library ( std::string const &  name)

Returns a predicate that matches all suites in a library.

Definition at line 163 of file match.h.

◆ make_suite_info()

template<class Suite >
suite_info beast::unit_test::make_suite_info ( std::string  name,
std::string  module,
std::string  library,
bool  manual,
int  priority 
)

Convenience for producing suite_info for a given test type.

Definition at line 103 of file suite_info.h.

◆ BEAST_DEFINE_TESTSUITE_MANUAL()

beast::unit_test::BEAST_DEFINE_TESTSUITE_MANUAL ( print  ,
beast  ,
beast   
)