xrpld
Loading...
Searching...
No Matches
xrpl::test::jtx::RequireAny Class Reference

Test helper that accepts any condition supplied by a callback. More...

#include <mpt.h>

Collaboration diagram for xrpl::test::jtx::RequireAny:

Public Member Functions

 RequireAny (std::function< bool()> const &cb, std::source_location const &testLoc=std::source_location::current(), std::source_location const &checkLoc=std::source_location::current())
void operator() (Env &env) const

Private Attributes

std::function< bool()> cb_
std::source_location testLoc_
std::source_location checkLoc_

Detailed Description

Test helper that accepts any condition supplied by a callback.

Definition at line 135 of file mpt.h.

Constructor & Destructor Documentation

◆ RequireAny()

xrpl::test::jtx::RequireAny::RequireAny ( std::function< bool()> const & cb,
std::source_location const & testLoc = std::source_location::current(),
std::source_location const & checkLoc = std::source_location::current() )

Definition at line 145 of file mpt.h.

Member Function Documentation

◆ operator()()

void xrpl::test::jtx::RequireAny::operator() ( Env & env) const

Definition at line 211 of file mpt.cpp.

Member Data Documentation

◆ cb_

std::function<bool()> xrpl::test::jtx::RequireAny::cb_
private

Definition at line 138 of file mpt.h.

◆ testLoc_

std::source_location xrpl::test::jtx::RequireAny::testLoc_
private

Definition at line 140 of file mpt.h.

◆ checkLoc_

std::source_location xrpl::test::jtx::RequireAny::checkLoc_
private

Definition at line 142 of file mpt.h.