rippled
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static 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 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.
 
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 ()
 

Static Protected Member Functions

static void topUpBorrower (jtx::Env &env, BrokerInfo const &broker, jtx::Account const &issuer, jtx::Account const &borrower, LoanState const &state, std::optional< Number > const &servFee)
 
static std::string getCurrencyLabel (Asset const &asset)
 

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 7055 of file Loan_test.cpp.

Member Enumeration Documentation

◆ AssetType

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

Definition at line 566 of file Loan_test.cpp.

Member Function Documentation

◆ testRandomLoan()

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

Definition at line 7083 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 7120 of file Loan_test.cpp.

◆ testDisabled()

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

Definition at line 30 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 424 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 472 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 501 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 543 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 570 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 630 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 678 of file Loan_test.cpp.

◆ topUpBorrower()

static 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 
)
staticprotectedinherited

Definition at line 750 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 789 of file Loan_test.cpp.

◆ runLoan()

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

Definition at line 1130 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 1177 of file Loan_test.cpp.

◆ getCurrencyLabel()

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

Definition at line 1472 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 1493 of file Loan_test.cpp.

◆ testLoanSet()

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

Definition at line 2813 of file Loan_test.cpp.

◆ testLifecycle()

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

Definition at line 3370 of file Loan_test.cpp.

◆ testSelfLoan()

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

Definition at line 3464 of file Loan_test.cpp.

◆ testBatchBypassCounterparty()

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

Definition at line 3599 of file Loan_test.cpp.

◆ testWrongMaxDebtBehavior()

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

Definition at line 3667 of file Loan_test.cpp.

◆ testLoanPayComputePeriodicPaymentValidRateInvariant()

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

Definition at line 3713 of file Loan_test.cpp.

◆ testRPC()

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

Definition at line 3781 of file Loan_test.cpp.

◆ testServiceFeeOnBrokerDeepFreeze()

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

Definition at line 4085 of file Loan_test.cpp.

◆ testIssuerLoan()

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

Definition at line 4170 of file Loan_test.cpp.

◆ testInvalidLoanDelete()

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

Definition at line 4208 of file Loan_test.cpp.

◆ testInvalidLoanManage()

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

Definition at line 4225 of file Loan_test.cpp.

◆ testInvalidLoanPay()

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

Definition at line 4242 of file Loan_test.cpp.

◆ testInvalidLoanSet()

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

Definition at line 4320 of file Loan_test.cpp.

◆ testAccountSendMptMinAmountInvariant()

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

Definition at line 4460 of file Loan_test.cpp.

◆ testLoanPayDebtDecreaseInvariant()

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

Definition at line 4520 of file Loan_test.cpp.

◆ testLoanPayComputePeriodicPaymentValidTotalInterestInvariant()

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

Definition at line 4613 of file Loan_test.cpp.

◆ testDosLoanPay()

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

Definition at line 4678 of file Loan_test.cpp.

◆ testLoanPayComputePeriodicPaymentValidTotalPrincipalPaidInvariant()

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

Definition at line 4755 of file Loan_test.cpp.

◆ testLoanPayComputePeriodicPaymentValidTotalInterestPaidInvariant()

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

Definition at line 4855 of file Loan_test.cpp.

◆ testLoanNextPaymentDueDateOverflow()

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

Definition at line 4940 of file Loan_test.cpp.

◆ testRequireAuth()

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

Definition at line 5190 of file Loan_test.cpp.

◆ testCoverDepositWithdrawNonTransferableMPT()

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

Definition at line 5247 of file Loan_test.cpp.

◆ testPoC_UnsignedUnderflowOnFullPayAfterEarlyPeriodic()

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

Definition at line 5581 of file Loan_test.cpp.

◆ testDustManipulation()

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

Definition at line 5799 of file Loan_test.cpp.

◆ testRIPD3831()

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

Definition at line 5939 of file Loan_test.cpp.

◆ testRIPD3459()

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

Definition at line 6012 of file Loan_test.cpp.

◆ testRIPD3901()

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

Definition at line 6081 of file Loan_test.cpp.

◆ testRoundingAllowsUndercoverage()

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

Definition at line 6137 of file Loan_test.cpp.

◆ testRIPD3902()

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

Definition at line 6216 of file Loan_test.cpp.

◆ testBorrowerIsBroker()

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

Definition at line 6270 of file Loan_test.cpp.

◆ testIssuerIsBorrower()

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

Definition at line 6387 of file Loan_test.cpp.

◆ testLimitExceeded()

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

Definition at line 6434 of file Loan_test.cpp.

◆ testOverpaymentManagementFee()

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

Definition at line 6504 of file Loan_test.cpp.

◆ testLoanPayBrokerOwnerMissingTrustline()

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

Definition at line 6557 of file Loan_test.cpp.

◆ testLoanPayBrokerOwnerUnauthorizedMPT()

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

Definition at line 6625 of file Loan_test.cpp.

◆ testLoanPayBrokerOwnerNoPermissionedDomainMPT()

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

Definition at line 6706 of file Loan_test.cpp.

◆ testLoanSetBrokerOwnerNoPermissionedDomainMPT()

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

Definition at line 6809 of file Loan_test.cpp.

◆ testSequentialFLCDepletion()

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

Definition at line 6881 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 156 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 389 of file suite.h.

◆ pass()

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

Record a successful test condition.

Definition at line 497 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 519 of file suite.h.

◆ fail() [2/2]

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

Definition at line 506 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 224 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 406 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 235 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 419 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 434 of file suite.h.

◆ except() [2/4]

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

Definition at line 254 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 451 of file suite.h.

◆ except() [4/4]

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

Definition at line 263 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 468 of file suite.h.

◆ unexcept() [2/2]

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

Definition at line 272 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 279 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 485 of file suite.h.

◆ unexpected() [2/2]

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

Definition at line 292 of file suite.h.

◆ p_this_suite()

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

Definition at line 301 of file suite.h.

◆ propagate_abort()

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

Definition at line 525 of file suite.h.

Member Data Documentation

◆ engine_

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

Definition at line 7058 of file Loan_test.cpp.

◆ assetDist

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

Definition at line 7060 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 7061 of file Loan_test.cpp.

◆ interestRateDist

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

Definition at line 7062 of file Loan_test.cpp.

◆ paymentTotalDist

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

Definition at line 7063 of file Loan_test.cpp.

◆ paymentIntervalDist

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

Definition at line 7064 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 7065 of file Loan_test.cpp.

◆ serviceFeeDist

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

Definition at line 7066 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:78

Definition at line 23 of file Loan_test.cpp.

◆ iouCurrency

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

Definition at line 27 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 147 of file suite.h.

◆ testcase

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

Memberspace for declaring test cases.

Definition at line 150 of file suite.h.