|
| 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) |
| | DEPRECATED.
|
| 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) |
|
| void | closePastDue (test::jtx::Env &env, Keylet const &loanKeylet) |
| void | closePastGrace (test::jtx::Env &env, Keylet const &loanKeylet) |
| void | impairWhenLate (test::jtx::Env &env, test::jtx::Account const &owner, Keylet const &loanKeylet) |
| void | defaultAfterGrace (test::jtx::Env &env, test::jtx::Account const &owner, Keylet const &loanKeylet) |
| void | checkVaultLoanSums (test::jtx::Env &env, CoarsenedVault const &coarsened, std::string const &label={}) |
| void | checkVaultLoanSums (test::jtx::Env &env, LendingFixture const &fixture, std::vector< Keylet > const &loanKeylets, std::string const &label={}) |
| void | expectCoarsened (test::jtx::Env const &env, CoarsenedVault const &coarsened) |
| void | expectCoarsened (test::jtx::Env const &env, Keylet const &vaultKeylet) |
| Number | debitAvailable (test::jtx::Env &env, CoarsenedVault const &coarsened, Debit kind, test::jtx::Account const &issuer, test::jtx::Account const &depositor, PrettyAsset const &asset, Number const &amount) |
| CoarsenedVault | coarsenVault (test::jtx::Env &env, test::jtx::Account const &owner, test::jtx::Account const &depositor, PrettyAsset const &asset) |
| CoarsenedVault | coarsenVault (test::jtx::Env &env, test::jtx::Account const &owner, test::jtx::Account const &depositor, PrettyAsset const &asset, CoarsenParams const ¶ms) |
| void | compoundVaultBySoleHolderLoanCycles (test::jtx::Env &env, LendingFixture const &fixture, test::jtx::Account const &depositor, PrettyAsset const &asset, int cycles) |
| VaultSnapshot | snapshotVault (test::jtx::Env &env, Keylet const &vaultKeylet, PrettyAsset const &asset) |
| Number | expectAvailableAtSixteenDigits (test::jtx::Env const &env, Keylet const &vaultKeylet, PrettyAsset const &asset) |
| SLE::const_pointer | expectVault (test::jtx::Env const &env, Keylet const &vaultKeylet, VaultExpect const &expected) |
| void | checkFixedPrecisionSync (test::jtx::Env const &env, Keylet const &vaultKeylet, Number const &expectedAvailable) |
| void | closeToTime (test::jtx::Env &env, NetClock::time_point time, std::source_location const &loc=std::source_location::current()) |
| Runner & | runner () const |
| | Lets a suite compose other suites (e.g.
|
|
| static AssetAccounts | setupCoarsenIou (test::jtx::Env &env, bool clawback=false) |
| template<class T> |
| static std::uint64_t | toU64 (SLE::ConstRef vault, TypedField< T > const &field) |
| static void | fundIouHolder (test::jtx::Env &env, test::jtx::Account const &holder, AssetAccounts const &accounts, Number const &trustLimit, Number const &funds) |
| static LendingFixture | setupLendingVault (test::jtx::Env &env, test::jtx::Account const &owner, test::jtx::Account const &depositor, PrettyAsset const &asset, Number const &depositAmount, std::chrono::seconds investmentWindow=std::chrono::seconds{1 '000 '000}, std::optional< std::uint8_t > scale=std::nullopt, TenthBips32 coverRateMinimum=TenthBips32(0), TenthBips32 coverRateLiquidation=TenthBips32(0), TenthBips16 managementFeeRate=TenthBips16(0)) |
| static Keylet | openLoan (test::jtx::Env &env, LendingFixture const &fixture, Number const &principal, std::uint32_t paymentTotal, TenthBips32 interestRate=TenthBips32(0), std::uint32_t flags=0, std::uint32_t paymentInterval=120, std::uint32_t gracePeriod=60) |
| static FeatureBitset | features () |
| static std::pair< test::jtx::Vault, Keylet > | createScaledVault (test::jtx::Env &env, test::jtx::Account const &owner, Asset const &asset, std::uint8_t scale) |
| static AssetAccounts | setupIou (test::jtx::Env &env, IouParams const ¶ms) |
| static AssetAccounts | setupIou (test::jtx::Env &env) |
| static AssetAccounts | setupMpt (test::jtx::Env &env, MptParams const ¶ms) |
| static Number | largestPowerOfTenAtMost (Number const &x) |
| static Number | smallestPowerOfTenAbove (Number const &x) |
| static NetClock::duration | getLedgerTimeResolution (test::jtx::Env &env) |
| | Get the current ledger's close time resolution.
|
| static ClosedEndedSetup | makeClosedEndedVault (test::jtx::Env &env, test::jtx::Account const &owner, Asset const &asset, std::uint32_t subOffset, std::uint32_t gap) |
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
-
| shouldBeTrue | The condition to test. The condition is evaluated in a boolean context. |
| reason | Optional added text to output on a failure. |
| file | The source code file where the test failed. |
| line | The source code line number where the test failed. |
- Returns
- true if the test condition indicates success.
Definition at line 235 of file suite.h.