xrpld
Loading...
Searching...
No Matches
MPTokenEntry.cpp
1#include <xrpl/ledger/entries/MPTokenEntry.h>
2
3#include <xrpl/protocol/Indexes.h>
4#include <xrpl/protocol/UintTypes.h>
5
6#include <gtest/gtest.h>
7#include <ledger/EntryTestHelpers.h>
8
9namespace xrpl::test {
10
11TEST(MPTokenEntryTests, constructors)
12{
14
15 MPTID const issuanceID = makeMptID(1, e.alice.id());
16
18 e,
19 keylet::mptoken(issuanceID, e.bob.id()),
20 "mptoken(MPTID, holder)",
21 issuanceID,
22 e.bob.id());
23
25 e,
26 keylet::mptoken(e.someID(), e.bob.id()),
27 "mptoken(issuanceKey, holder)",
28 e.someID(),
29 e.bob.id());
30
31 expectKeylet<MPTokenEntry>(e, keylet::mptoken(e.someID()), "mptoken(UInt256)", e.someID());
32}
33
34} // namespace xrpl::test
Scaffolding shared by the per-entry-type suites.
UInt256 someID() const
An arbitrary but stable UInt256, for the entry constructors that take an object ID directly.
AccountID id() const
Returns the Account ID.
Keylet mptoken(MPTID const &issuanceID, AccountID const &holder) noexcept
Definition Indexes.cpp:573
TEST(UnitsTest, types)
Definition Units.cpp:16
void expectKeylet(EntryTestEnv &e, Keylet const &expected, std::string const &what, Args const &... args)
Assert that both flavors of Entry built from args resolve the ledger object that expected names.
BaseUInt< 192 > MPTID
MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence ...
Definition UintTypes.h:54
MPTID makeMptID(std::uint32_t const sequence, AccountID const &account)
Definition Indexes.cpp:206