1#include <test/jtx/balance.h>
7#define TEST_EXPECT(cond) env.test.expect(cond, __FILE__, __LINE__)
8#define TEST_EXPECTS(cond, reason) \
9 ((cond) ? (env.test.pass(), true) : (env.test.fail((reason), __FILE__, __LINE__), false))
21 else if (TEST_EXPECT(sle))
24 sle->getFieldAmount(sfBalance) == value,
25 sle->getFieldAmount(sfBalance).
getText() +
" / " + value.
getText());
35 else if (TEST_EXPECT(sle))
37 auto amount = sle->getFieldAmount(sfBalance);
54 else if (TEST_EXPECT(sle))
57 TEST_EXPECT(
amount == value);
constexpr value_type const & value() const
A currency issued by an account.
constexpr MPTID const & getMptID() const
std::string getText() const override
Asset const & asset() const
AccountID id() const
Returns the Account ID.
A transaction testing environment.
std::shared_ptr< SLE const > le(Account const &account) const
Return an account root.
void operator()(Env &) const
Keylet line(AccountID const &id0, AccountID const &id1, Currency const ¤cy) noexcept
The index of a trust line for a given currency.
Keylet mptoken(MPTID const &issuanceID, AccountID const &holder) noexcept
Keylet account(AccountID const &id) noexcept
AccountID root.
void doBalance(Env &env, AccountID const &account, bool none, STAmount const &value, Issue const &issue)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool isXRP(AccountID const &c)