rippled
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
xrpl::test::LoanBatch_test Class Reference
Inheritance diagram for xrpl::test::LoanBatch_test:
Inheritance graph
[legend]
Collaboration diagram for xrpl::test::LoanBatch_test:
Collaboration graph
[legend]

Public Member Functions

void run () override
 Runs the suite.
 
template<class = void>
void operator() (runner &r)
 Invokes the test using the specified runner.
 
template<class = void>
void pass ()
 Record a successful test condition.
 
template<class F , class String >
bool except (F &&f, String const &reason)
 
template<class F >
bool except (F &&f)
 
template<class E , class F , class String >
bool except (F &&f, String const &reason)
 
template<class E , class F >
bool except (F &&f)
 
template<class F , class String >
bool unexcept (F &&f, String const &reason)
 
template<class F >
bool unexcept (F &&f)
 
std::string const & arg () const
 Return the argument associated with the runner.
 
template<class Condition , class String >
bool unexpected (Condition shouldBeFalse, String const &reason)
 
template<class Condition >
bool unexpected (Condition shouldBeFalse)
 
template<class String >
void fail (String const &reason, char const *file, int line)
 Record a failure.
 
template<class = void>
void fail (std::string const &reason="")
 
template<class Condition >
bool expect (Condition const &shouldBeTrue)
 Evaluate a test condition.
 
template<class Condition , class String >
bool expect (Condition const &shouldBeTrue, String const &reason)
 
template<class Condition >
bool expect (Condition const &shouldBeTrue, char const *file, int line)
 
template<class Condition , class String >
bool expect (Condition const &shouldBeTrue, String const &reason, char const *file, int line)
 

Static Public Member Functions

static suitethis_suite ()
 Returns the "current" running suite.
 

Public Attributes

log_os< char > log
 Logging output stream.
 
testcase_t testcase
 Memberspace for declaring test cases.
 

Protected Types

enum class  AssetType { XRP = 0 , IOU = 1 , MPT = 2 }
 

Protected Member Functions

void testRandomLoan ()
 
void testDisabled ()
 
BrokerInfo createVaultAndBroker (jtx::Env &env, jtx::PrettyAsset const &asset, jtx::Account const &lender, BrokerParameters const &params=BrokerParameters::defaults())
 
LoanState getCurrentState (jtx::Env const &env, BrokerInfo const &broker, Keylet const &loanKeylet)
 Get the state without checking anything.
 
LoanState getCurrentState (jtx::Env const &env, BrokerInfo const &broker, Keylet const &loanKeylet, VerifyLoanStatus const &verifyLoanStatus)
 Get the state and check the values against the parameters used in lifecycle
 
bool canImpairLoan (jtx::Env const &env, BrokerInfo const &broker, LoanState const &state)
 
jtx::PrettyAsset createAsset (jtx::Env &env, AssetType assetType, BrokerParameters const &brokerParams, jtx::Account const &issuer, jtx::Account const &lender, jtx::Account const &borrower)
 
void describeLoan (jtx::Env &env, BrokerParameters const &brokerParams, LoanParameters const &loanParams, AssetType assetType, jtx::Account const &issuer, jtx::Account const &lender, jtx::Account const &borrower)
 
std::optional< std::tuple< BrokerInfo, Keylet, jtx::Account > > createLoan (jtx::Env &env, AssetType assetType, BrokerParameters const &brokerParams, LoanParameters const &loanParams, jtx::Account const &issuer, jtx::Account const &lender, jtx::Account const &borrower)
 
void topUpBorrower (jtx::Env &env, BrokerInfo const &broker, jtx::Account const &issuer, jtx::Account const &borrower, LoanState const &state, std::optional< Number > const &servFee)
 
void makeLoanPayments (jtx::Env &env, BrokerInfo const &broker, LoanParameters const &loanParams, Keylet const &loanKeylet, VerifyLoanStatus const &verifyLoanStatus, jtx::Account const &issuer, jtx::Account const &lender, jtx::Account const &borrower, PaymentParameters const &paymentParams=PaymentParameters::defaults())
 
void runLoan (AssetType assetType, BrokerParameters const &brokerParams, LoanParameters const &loanParams)
 
void lifecycle (std::string const &caseLabel, char const *label, jtx::Env &env, Number const &loanAmount, int interestExponent, jtx::Account const &lender, jtx::Account const &borrower, jtx::Account const &evan, BrokerInfo const &broker, jtx::Account const &pseudoAcct, std::uint32_t flags, std::function< void(Keylet const &loanKeylet, VerifyLoanStatus const &verifyLoanStatus)> toEndOfLife)
 Runs through the complete lifecycle of a loan.
 
std::string getCurrencyLabel (Asset const &asset)
 
template<class TAsset , std::size_t NAsset>
void testCaseWrapper (jtx::Env &env, jtx::MPTTester &mptt, std::array< TAsset, NAsset > const &assets, BrokerInfo const &broker, Number const &loanAmount, int interestExponent)
 Wrapper to run a series of lifecycle tests for a given asset and loan amount.
 
void testLoanSet ()
 
void testLifecycle ()
 
void testSelfLoan ()
 
void testBatchBypassCounterparty ()
 
void testWrongMaxDebtBehavior ()
 
void testLoanPayComputePeriodicPaymentValidRateInvariant ()
 
void testRPC ()
 
void testServiceFeeOnBrokerDeepFreeze ()
 
void testIssuerLoan ()
 
void testInvalidLoanDelete ()
 
void testInvalidLoanManage ()
 
void testInvalidLoanPay ()
 
void testInvalidLoanSet ()
 
void testAccountSendMptMinAmountInvariant ()
 
void testLoanPayDebtDecreaseInvariant ()
 
void testLoanPayComputePeriodicPaymentValidTotalInterestInvariant ()
 
void testDosLoanPay ()
 
void testLoanPayComputePeriodicPaymentValidTotalPrincipalPaidInvariant ()
 
void testLoanPayComputePeriodicPaymentValidTotalInterestPaidInvariant ()
 
void testLoanNextPaymentDueDateOverflow ()
 
void testRequireAuth ()
 
void testCoverDepositWithdrawNonTransferableMPT ()
 
void testPoC_UnsignedUnderflowOnFullPayAfterEarlyPeriodic ()
 
void testDustManipulation ()
 
void testRIPD3831 ()
 
void testRIPD3459 ()
 
void testRIPD3901 ()
 
void testRoundingAllowsUndercoverage ()
 
void testRIPD3902 ()
 
void testBorrowerIsBroker ()
 
void testIssuerIsBorrower ()
 
void testLimitExceeded ()
 
void testOverpaymentManagementFee ()
 
void testLoanPayBrokerOwnerMissingTrustline ()
 
void testLoanPayBrokerOwnerUnauthorizedMPT ()
 
void testLoanPayBrokerOwnerNoPermissionedDomainMPT ()
 
void testLoanSetBrokerOwnerNoPermissionedDomainMPT ()
 
void testSequentialFLCDepletion ()
 

Protected Attributes

beast::xor_shift_engine engine_
 
std::uniform_int_distribution assetDist {0, 2}
 
std::uniform_int_distribution< std::int64_tprincipalDist {100'000, 1'000'000'000}
 
std::uniform_int_distribution< std::uint32_tinterestRateDist {0, 10000}
 
std::uniform_int_distribution paymentTotalDist {12, 10000}
 
std::uniform_int_distribution paymentIntervalDist {60, 3600 * 24 * 30}
 
std::uniform_int_distribution< std::uint16_tmanagementFeeRateDist {0, 10'000}
 
std::uniform_int_distribution serviceFeeDist {0, 20}
 
FeatureBitset const all
 
std::string const iouCurrency {"IOU"}
 

Private Member Functions

void propagate_abort ()
 

Static Private Member Functions

static suite ** p_this_suite ()
 

Private Attributes

bool abort_ = false
 
bool aborted_ = false
 
runner * runner_ = nullptr
 

Detailed Description

Definition at line 6736 of file Loan_test.cpp.

Member Enumeration Documentation

◆ AssetType

enum class xrpl::test::Loan_test::AssetType
strongprotectedinherited
Enumerator
XRP 
IOU 
MPT 

Definition at line 540 of file Loan_test.cpp.

Member Function Documentation

◆ testRandomLoan()

void xrpl::test::LoanBatch_test::testRandomLoan ( )
protected

Definition at line 6764 of file Loan_test.cpp.

◆ run()

void xrpl::test::LoanBatch_test::run ( )
overridevirtual

Runs the suite.

Reimplemented from xrpl::test::Loan_test.

Definition at line 6801 of file Loan_test.cpp.

◆ testDisabled()

void xrpl::test::Loan_test::testDisabled ( )
protectedinherited

Definition at line 31 of file Loan_test.cpp.

◆ createVaultAndBroker()

BrokerInfo xrpl::test::Loan_test::createVaultAndBroker ( jtx::Env env,
jtx::PrettyAsset const &  asset,
jtx::Account const &  lender,
BrokerParameters const &  params = BrokerParameters::defaults() 
)
protectedinherited

Definition at line 404 of file Loan_test.cpp.

◆ getCurrentState() [1/2]

LoanState xrpl::test::Loan_test::getCurrentState ( jtx::Env const &  env,
BrokerInfo const &  broker,
Keylet const &  loanKeylet 
)
protectedinherited

Get the state without checking anything.

Definition at line 452 of file Loan_test.cpp.

◆ getCurrentState() [2/2]

LoanState xrpl::test::Loan_test::getCurrentState ( jtx::Env const &  env,
BrokerInfo const &  broker,
Keylet const &  loanKeylet,
VerifyLoanStatus const &  verifyLoanStatus 
)
protectedinherited

Get the state and check the values against the parameters used in lifecycle

Definition at line 481 of file Loan_test.cpp.

◆ canImpairLoan()

bool xrpl::test::Loan_test::canImpairLoan ( jtx::Env const &  env,
BrokerInfo const &  broker,
LoanState const &  state 
)
protectedinherited

Definition at line 520 of file Loan_test.cpp.

◆ createAsset()

jtx::PrettyAsset xrpl::test::Loan_test::createAsset ( jtx::Env env,
AssetType  assetType,
BrokerParameters const &  brokerParams,
jtx::Account const &  issuer,
jtx::Account const &  lender,
jtx::Account const &  borrower 
)
protectedinherited

Definition at line 544 of file Loan_test.cpp.

◆ describeLoan()

void xrpl::test::Loan_test::describeLoan ( jtx::Env env,
BrokerParameters const &  brokerParams,
LoanParameters const &  loanParams,
AssetType  assetType,
jtx::Account const &  issuer,
jtx::Account const &  lender,
jtx::Account const &  borrower 
)
protectedinherited

Definition at line 603 of file Loan_test.cpp.

◆ createLoan()

std::optional< std::tuple< BrokerInfo, Keylet, jtx::Account > > xrpl::test::Loan_test::createLoan ( jtx::Env env,
AssetType  assetType,
BrokerParameters const &  brokerParams,
LoanParameters const &  loanParams,
jtx::Account const &  issuer,
jtx::Account const &  lender,
jtx::Account const &  borrower 
)
protectedinherited

Definition at line 645 of file Loan_test.cpp.

◆ topUpBorrower()

void xrpl::test::Loan_test::topUpBorrower ( jtx::Env env,
BrokerInfo const &  broker,
jtx::Account const &  issuer,
jtx::Account const &  borrower,
LoanState const &  state,
std::optional< Number > const &  servFee 
)
protectedinherited

Definition at line 715 of file Loan_test.cpp.

◆ makeLoanPayments()

void xrpl::test::Loan_test::makeLoanPayments ( jtx::Env env,
BrokerInfo const &  broker,
LoanParameters const &  loanParams,
Keylet const &  loanKeylet,
VerifyLoanStatus const &  verifyLoanStatus,
jtx::Account const &  issuer,
jtx::Account const &  lender,
jtx::Account const &  borrower,
PaymentParameters const &  paymentParams = PaymentParameters::defaults() 
)
protectedinherited

Definition at line 748 of file Loan_test.cpp.

◆ runLoan()

void xrpl::test::Loan_test::runLoan ( AssetType  assetType,
BrokerParameters const &  brokerParams,
LoanParameters const &  loanParams 
)
protectedinherited

Definition at line 1050 of file Loan_test.cpp.

◆ lifecycle()

void xrpl::test::Loan_test::lifecycle ( std::string const &  caseLabel,
char const *  label,
jtx::Env env,
Number const &  loanAmount,
int  interestExponent,
jtx::Account const &  lender,
jtx::Account const &  borrower,
jtx::Account const &  evan,
BrokerInfo const &  broker,
jtx::Account const &  pseudoAcct,
std::uint32_t  flags,
std::function< void(Keylet const &loanKeylet, VerifyLoanStatus const &verifyLoanStatus)>  toEndOfLife 
)
protectedinherited

Runs through the complete lifecycle of a loan.

  1. Create a loan.
  2. Test a bunch of transaction failure conditions.
  3. Use the toEndOfLife callback to take the loan to 0. How that is done depends on the callback. e.g. Default, Early payoff, make all the normal payments, etc.
  4. Delete the loan. The loan will alternate between being deleted by the lender and the borrower.

Definition at line 1093 of file Loan_test.cpp.

◆ getCurrencyLabel()

std::string xrpl::test::Loan_test::getCurrencyLabel ( Asset const &  asset)
protectedinherited

Definition at line 1373 of file Loan_test.cpp.

◆ testCaseWrapper()

template<class TAsset , std::size_t NAsset>
void xrpl::test::Loan_test::testCaseWrapper ( jtx::Env env,
jtx::MPTTester mptt,
std::array< TAsset, NAsset > const &  assets,
BrokerInfo const &  broker,
Number const &  loanAmount,
int  interestExponent 
)
protectedinherited

Wrapper to run a series of lifecycle tests for a given asset and loan amount.

Will be used in the future to vary the loan parameters. For now, it is only called once.

Tests a bunch of LoanSet failure conditions before lifecycle.

Definition at line 1388 of file Loan_test.cpp.

◆ testLoanSet()

void xrpl::test::Loan_test::testLoanSet ( )
protectedinherited

Definition at line 2615 of file Loan_test.cpp.

◆ testLifecycle()

void xrpl::test::Loan_test::testLifecycle ( )
protectedinherited

Definition at line 3170 of file Loan_test.cpp.

◆ testSelfLoan()

void xrpl::test::Loan_test::testSelfLoan ( )
protectedinherited

Definition at line 3261 of file Loan_test.cpp.

◆ testBatchBypassCounterparty()

void xrpl::test::Loan_test::testBatchBypassCounterparty ( )
protectedinherited

Definition at line 3394 of file Loan_test.cpp.

◆ testWrongMaxDebtBehavior()

void xrpl::test::Loan_test::testWrongMaxDebtBehavior ( )
protectedinherited

Definition at line 3462 of file Loan_test.cpp.

◆ testLoanPayComputePeriodicPaymentValidRateInvariant()

void xrpl::test::Loan_test::testLoanPayComputePeriodicPaymentValidRateInvariant ( )
protectedinherited

Definition at line 3507 of file Loan_test.cpp.

◆ testRPC()

void xrpl::test::Loan_test::testRPC ( )
protectedinherited

Definition at line 3575 of file Loan_test.cpp.

◆ testServiceFeeOnBrokerDeepFreeze()

void xrpl::test::Loan_test::testServiceFeeOnBrokerDeepFreeze ( )
protectedinherited

Definition at line 3868 of file Loan_test.cpp.

◆ testIssuerLoan()

void xrpl::test::Loan_test::testIssuerLoan ( )
protectedinherited

Definition at line 3951 of file Loan_test.cpp.

◆ testInvalidLoanDelete()

void xrpl::test::Loan_test::testInvalidLoanDelete ( )
protectedinherited

Definition at line 3988 of file Loan_test.cpp.

◆ testInvalidLoanManage()

void xrpl::test::Loan_test::testInvalidLoanManage ( )
protectedinherited

Definition at line 4005 of file Loan_test.cpp.

◆ testInvalidLoanPay()

void xrpl::test::Loan_test::testInvalidLoanPay ( )
protectedinherited

Definition at line 4022 of file Loan_test.cpp.

◆ testInvalidLoanSet()

void xrpl::test::Loan_test::testInvalidLoanSet ( )
protectedinherited

Definition at line 4101 of file Loan_test.cpp.

◆ testAccountSendMptMinAmountInvariant()

void xrpl::test::Loan_test::testAccountSendMptMinAmountInvariant ( )
protectedinherited

Definition at line 4229 of file Loan_test.cpp.

◆ testLoanPayDebtDecreaseInvariant()

void xrpl::test::Loan_test::testLoanPayDebtDecreaseInvariant ( )
protectedinherited

Definition at line 4289 of file Loan_test.cpp.

◆ testLoanPayComputePeriodicPaymentValidTotalInterestInvariant()

void xrpl::test::Loan_test::testLoanPayComputePeriodicPaymentValidTotalInterestInvariant ( )
protectedinherited

Definition at line 4377 of file Loan_test.cpp.

◆ testDosLoanPay()

void xrpl::test::Loan_test::testDosLoanPay ( )
protectedinherited

Definition at line 4442 of file Loan_test.cpp.

◆ testLoanPayComputePeriodicPaymentValidTotalPrincipalPaidInvariant()

void xrpl::test::Loan_test::testLoanPayComputePeriodicPaymentValidTotalPrincipalPaidInvariant ( )
protectedinherited

Definition at line 4516 of file Loan_test.cpp.

◆ testLoanPayComputePeriodicPaymentValidTotalInterestPaidInvariant()

void xrpl::test::Loan_test::testLoanPayComputePeriodicPaymentValidTotalInterestPaidInvariant ( )
protectedinherited

Definition at line 4614 of file Loan_test.cpp.

◆ testLoanNextPaymentDueDateOverflow()

void xrpl::test::Loan_test::testLoanNextPaymentDueDateOverflow ( )
protectedinherited

Definition at line 4696 of file Loan_test.cpp.

◆ testRequireAuth()

void xrpl::test::Loan_test::testRequireAuth ( )
protectedinherited

Definition at line 4938 of file Loan_test.cpp.

◆ testCoverDepositWithdrawNonTransferableMPT()

void xrpl::test::Loan_test::testCoverDepositWithdrawNonTransferableMPT ( )
protectedinherited

Definition at line 4995 of file Loan_test.cpp.

◆ testPoC_UnsignedUnderflowOnFullPayAfterEarlyPeriodic()

void xrpl::test::Loan_test::testPoC_UnsignedUnderflowOnFullPayAfterEarlyPeriodic ( )
protectedinherited

Definition at line 5322 of file Loan_test.cpp.

◆ testDustManipulation()

void xrpl::test::Loan_test::testDustManipulation ( )
protectedinherited

Definition at line 5524 of file Loan_test.cpp.

◆ testRIPD3831()

void xrpl::test::Loan_test::testRIPD3831 ( )
protectedinherited

Definition at line 5660 of file Loan_test.cpp.

◆ testRIPD3459()

void xrpl::test::Loan_test::testRIPD3459 ( )
protectedinherited

Definition at line 5732 of file Loan_test.cpp.

◆ testRIPD3901()

void xrpl::test::Loan_test::testRIPD3901 ( )
protectedinherited

Definition at line 5800 of file Loan_test.cpp.

◆ testRoundingAllowsUndercoverage()

void xrpl::test::Loan_test::testRoundingAllowsUndercoverage ( )
protectedinherited

Definition at line 5853 of file Loan_test.cpp.

◆ testRIPD3902()

void xrpl::test::Loan_test::testRIPD3902 ( )
protectedinherited

Definition at line 5929 of file Loan_test.cpp.

◆ testBorrowerIsBroker()

void xrpl::test::Loan_test::testBorrowerIsBroker ( )
protectedinherited

Definition at line 5982 of file Loan_test.cpp.

◆ testIssuerIsBorrower()

void xrpl::test::Loan_test::testIssuerIsBorrower ( )
protectedinherited

Definition at line 6088 of file Loan_test.cpp.

◆ testLimitExceeded()

void xrpl::test::Loan_test::testLimitExceeded ( )
protectedinherited

Definition at line 6133 of file Loan_test.cpp.

◆ testOverpaymentManagementFee()

void xrpl::test::Loan_test::testOverpaymentManagementFee ( )
protectedinherited

Definition at line 6191 of file Loan_test.cpp.

◆ testLoanPayBrokerOwnerMissingTrustline()

void xrpl::test::Loan_test::testLoanPayBrokerOwnerMissingTrustline ( )
protectedinherited

Definition at line 6242 of file Loan_test.cpp.

◆ testLoanPayBrokerOwnerUnauthorizedMPT()

void xrpl::test::Loan_test::testLoanPayBrokerOwnerUnauthorizedMPT ( )
protectedinherited

Definition at line 6309 of file Loan_test.cpp.

◆ testLoanPayBrokerOwnerNoPermissionedDomainMPT()

void xrpl::test::Loan_test::testLoanPayBrokerOwnerNoPermissionedDomainMPT ( )
protectedinherited

Definition at line 6389 of file Loan_test.cpp.

◆ testLoanSetBrokerOwnerNoPermissionedDomainMPT()

void xrpl::test::Loan_test::testLoanSetBrokerOwnerNoPermissionedDomainMPT ( )
protectedinherited

Definition at line 6491 of file Loan_test.cpp.

◆ testSequentialFLCDepletion()

void xrpl::test::Loan_test::testSequentialFLCDepletion ( )
protectedinherited

Definition at line 6563 of file Loan_test.cpp.

◆ this_suite()

static suite * beast::unit_test::suite::this_suite ( )
staticinherited

Returns the "current" running suite.

If no suite is running, nullptr is returned.

Definition at line 153 of file suite.h.

◆ operator()()

template<class >
void beast::unit_test::suite::operator() ( runner r)
inherited

Invokes the test using the specified runner.

Data members are set up here instead of the constructor as a convenience to writing the derived class to avoid repetition of forwarded constructor arguments to the base. Normally this is called by the framework for you.

Definition at line 386 of file suite.h.

◆ pass()

template<class >
void beast::unit_test::suite::pass ( )
inherited

Record a successful test condition.

Definition at line 494 of file suite.h.

◆ fail() [1/2]

template<class String >
void beast::unit_test::suite::fail ( String const &  reason,
char const *  file,
int  line 
)
inherited

Record a failure.

Parameters
reasonOptional text added to the output on a failure.
fileThe source code file where the test failed.
lineThe source code line number where the test failed.

Definition at line 516 of file suite.h.

◆ fail() [2/2]

template<class >
void beast::unit_test::suite::fail ( std::string const &  reason = "")
inherited

Definition at line 503 of file suite.h.

◆ expect() [1/4]

template<class Condition >
bool beast::unit_test::suite::expect ( Condition const &  shouldBeTrue)
inherited

Evaluate a test condition.

This function provides improved logging by incorporating the file name and line number into the reported output on failure, as well as additional text specified by the caller.

Parameters
shouldBeTrueThe condition to test. The condition is evaluated in a boolean context.
reasonOptional added text to output on a failure.
fileThe source code file where the test failed.
lineThe source code line number where the test failed.
Returns
true if the test condition indicates success.

Definition at line 221 of file suite.h.

◆ expect() [2/4]

template<class Condition , class String >
bool beast::unit_test::suite::expect ( Condition const &  shouldBeTrue,
String const &  reason 
)
inherited

Definition at line 403 of file suite.h.

◆ expect() [3/4]

template<class Condition >
bool beast::unit_test::suite::expect ( Condition const &  shouldBeTrue,
char const *  file,
int  line 
)
inherited

Definition at line 232 of file suite.h.

◆ expect() [4/4]

template<class Condition , class String >
bool beast::unit_test::suite::expect ( Condition const &  shouldBeTrue,
String const &  reason,
char const *  file,
int  line 
)
inherited

Definition at line 416 of file suite.h.

◆ except() [1/4]

template<class F , class String >
bool beast::unit_test::suite::except ( F &&  f,
String const &  reason 
)
inherited

Definition at line 431 of file suite.h.

◆ except() [2/4]

template<class F >
bool beast::unit_test::suite::except ( F &&  f)
inherited

Definition at line 251 of file suite.h.

◆ except() [3/4]

template<class E , class F , class String >
bool beast::unit_test::suite::except ( F &&  f,
String const &  reason 
)
inherited

Definition at line 448 of file suite.h.

◆ except() [4/4]

template<class E , class F >
bool beast::unit_test::suite::except ( F &&  f)
inherited

Definition at line 260 of file suite.h.

◆ unexcept() [1/2]

template<class F , class String >
bool beast::unit_test::suite::unexcept ( F &&  f,
String const &  reason 
)
inherited

Definition at line 465 of file suite.h.

◆ unexcept() [2/2]

template<class F >
bool beast::unit_test::suite::unexcept ( F &&  f)
inherited

Definition at line 269 of file suite.h.

◆ arg()

std::string const & beast::unit_test::suite::arg ( ) const
inherited

Return the argument associated with the runner.

Definition at line 276 of file suite.h.

◆ unexpected() [1/2]

template<class Condition , class String >
bool beast::unit_test::suite::unexpected ( Condition  shouldBeFalse,
String const &  reason 
)
inherited

Definition at line 482 of file suite.h.

◆ unexpected() [2/2]

template<class Condition >
bool beast::unit_test::suite::unexpected ( Condition  shouldBeFalse)
inherited

Definition at line 289 of file suite.h.

◆ p_this_suite()

static suite ** beast::unit_test::suite::p_this_suite ( )
staticprivateinherited

Definition at line 298 of file suite.h.

◆ propagate_abort()

void beast::unit_test::suite::propagate_abort ( )
privateinherited

Definition at line 522 of file suite.h.

Member Data Documentation

◆ engine_

beast::xor_shift_engine xrpl::test::LoanBatch_test::engine_
protected

Definition at line 6739 of file Loan_test.cpp.

◆ assetDist

std::uniform_int_distribution xrpl::test::LoanBatch_test::assetDist {0, 2}
protected

Definition at line 6741 of file Loan_test.cpp.

◆ principalDist

std::uniform_int_distribution<std::int64_t> xrpl::test::LoanBatch_test::principalDist {100'000, 1'000'000'000}
protected

Definition at line 6742 of file Loan_test.cpp.

◆ interestRateDist

std::uniform_int_distribution<std::uint32_t> xrpl::test::LoanBatch_test::interestRateDist {0, 10000}
protected

Definition at line 6743 of file Loan_test.cpp.

◆ paymentTotalDist

std::uniform_int_distribution xrpl::test::LoanBatch_test::paymentTotalDist {12, 10000}
protected

Definition at line 6744 of file Loan_test.cpp.

◆ paymentIntervalDist

std::uniform_int_distribution xrpl::test::LoanBatch_test::paymentIntervalDist {60, 3600 * 24 * 30}
protected

Definition at line 6745 of file Loan_test.cpp.

◆ managementFeeRateDist

std::uniform_int_distribution<std::uint16_t> xrpl::test::LoanBatch_test::managementFeeRateDist {0, 10'000}
protected

Definition at line 6746 of file Loan_test.cpp.

◆ serviceFeeDist

std::uniform_int_distribution xrpl::test::LoanBatch_test::serviceFeeDist {0, 20}
protected

Definition at line 6747 of file Loan_test.cpp.

◆ all

FeatureBitset const xrpl::test::Loan_test::all
protectedinherited
Initial value:
{
jtx::testable_amendments() | featureMPTokensV1 | featureSingleAssetVault | featureLendingProtocol}
FeatureBitset testable_amendments()
Definition Env.h:76

Definition at line 25 of file Loan_test.cpp.

◆ iouCurrency

std::string const xrpl::test::Loan_test::iouCurrency {"IOU"}
protectedinherited

Definition at line 28 of file Loan_test.cpp.

◆ abort_

bool beast::unit_test::suite::abort_ = false
privateinherited

Definition at line 53 of file suite.h.

◆ aborted_

bool beast::unit_test::suite::aborted_ = false
privateinherited

Definition at line 54 of file suite.h.

◆ runner_

runner* beast::unit_test::suite::runner_ = nullptr
privateinherited

Definition at line 55 of file suite.h.

◆ log

log_os<char> beast::unit_test::suite::log
inherited

Logging output stream.

Text sent to the log output stream will be forwarded to the output stream associated with the runner.

Definition at line 144 of file suite.h.

◆ testcase

testcase_t beast::unit_test::suite::testcase
inherited

Memberspace for declaring test cases.

Definition at line 147 of file suite.h.