xrpld
Loading...
Searching...
No Matches
beast::unit_test Namespace Reference

Namespaces

namespace  detail

Classes

class  Amount
 Utility for producing nicely composed output of amounts with units. More...
class  Selector
class  Recorder
 A test runner that stores the results. More...
class  CaseResults
 Holds a set of test condition outcomes in a testcase. More...
class  SuiteResults
 Holds the set of testcase results in a suite. More...
class  Results
 Holds the results of running a set of testsuites. More...
class  Runner
 Unit test runner interface. More...
class  Suite
 A testsuite class. More...
class  SuiteInfo
 Associates a unit test type with metadata. More...
class  SuiteList
 A container of test suites. More...
class  Thread
 Replacement for std::thread that handles exceptions in unit tests. More...
class  print_test
 A suite that prints the list of globally defined suites. More...

Typedefs

using reporter = detail::Reporter<>

Enumerations

enum class  AbortT { NoAbortOnFail , AbortOnFail }

Functions

std::ostreamoperator<< (std::ostream &s, Amount const &t)
SuiteList const & globalSuites ()
 Holds test suites registered during static initialization.
Selector matchAuto (std::string const &name)
 Returns a predicate that implements a smart matching rule.
Selector matchAll ()
 Return a predicate that matches all suites not marked manual.
Selector matchSuite (std::string const &name)
 Returns a predicate that matches a specific suite.
Selector matchLibrary (std::string const &name)
 Returns a predicate that matches all suites in a library.
template<class Suite>
SuiteInfo makeSuiteInfo (std::string name, std::string module, std::string library, bool manual, int priority)
 Convenience for producing SuiteInfo for a given test type.
 BEAST_DEFINE_TESTSUITE_MANUAL (print, beast, beast)

Typedef Documentation

◆ reporter

Definition at line 249 of file reporter.h.

Enumeration Type Documentation

◆ AbortT

enum class beast::unit_test::AbortT
strong
Enumerator
NoAbortOnFail 
AbortOnFail 

Definition at line 40 of file suite.h.

Function Documentation

◆ operator<<()

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

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

◆ globalSuites()

SuiteList const & beast::unit_test::globalSuites ( )

Holds test suites registered during static initialization.

Definition at line 39 of file global_suites.h.

◆ matchAuto()

Selector beast::unit_test::matchAuto ( std::string const & name)

Returns a predicate that implements a smart matching rule.

The predicate checks the suite, module, and library fields of the SuiteInfo 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 139 of file match.h.

◆ matchAll()

Selector beast::unit_test::matchAll ( )

Return a predicate that matches all suites not marked manual.

Definition at line 146 of file match.h.

◆ matchSuite()

Selector beast::unit_test::matchSuite ( std::string const & name)

Returns a predicate that matches a specific suite.

Definition at line 153 of file match.h.

◆ matchLibrary()

Selector beast::unit_test::matchLibrary ( std::string const & name)

Returns a predicate that matches all suites in a library.

Definition at line 160 of file match.h.

◆ makeSuiteInfo()

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

Convenience for producing SuiteInfo for a given test type.

Definition at line 99 of file suite_info.h.

◆ BEAST_DEFINE_TESTSUITE_MANUAL()

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