19#include <xrpld/ledger/BookDirs.h>
20#include <xrpl/protocol/Feature.h>
31 Env env(*
this, features);
34 env.
fund(
XRP(1000000),
"alice",
"bob",
"gw");
58 env(
offer(
"alice", gw[
"CNY"](50),
XRP(10)));
66 env(
pay(
"bob",
"alice",
Account(
"bob")[
"CNY"](10)));
76 for (
auto i = 1, j = 3; i <= 3; ++i, --j)
77 for (
auto k = 0; k < 80; ++k)
82 auto i = 1, j = 3, k = 0;
83 for (
auto const& e : d)
85 BEAST_EXPECT(e->getFieldAmount(sfTakerPays) == AUD(i));
86 BEAST_EXPECT(e->getFieldAmount(sfTakerGets) ==
XRP(j));
Immutable cryptographic account descriptor.
A transaction testing environment.
std::shared_ptr< OpenView const > current() const
Returns the current ledger.
void trust(STAmount const &amount, Account const &account)
Establish trust lines.
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
Json::Value pay(AccountID const &account, AccountID const &to, AnyAmount amount)
Create a payment.
Json::Value offer(Account const &account, STAmount const &takerPays, STAmount const &takerGets, std::uint32_t flags)
Create an offer.
XRP_t const XRP
Converts to XRP Issue or STAmount.
FeatureBitset supported_amendments()
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Issue const & xrpIssue()
Returns an asset specifier that represents XRP.
Book reversed(Book const &book)
void test_bookdir(FeatureBitset features)
void run() override
Runs the suite.