xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
tests
libxrpl
ledger
MPTokenIssuanceEntry.cpp
1
#include <xrpl/ledger/entries/MPTokenIssuanceEntry.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
9
#include <
cstdint
>
10
11
namespace
xrpl::test
{
12
13
TEST
(MPTokenIssuanceEntryTests, constructors)
14
{
15
EntryTestEnv
e;
16
17
MPTID
const
issuanceID =
makeMptID
(1, e.
alice
.
id
());
18
19
expectKeylet<MPTokenIssuanceEntry>
(
20
e,
21
keylet::mptokenIssuance
(
makeMptID
(1, e.
alice
.
id
())),
22
"mptokenIssuance(seq, issuer)"
,
23
std::uint32_t
{1},
24
e.
alice
.
id
());
25
26
expectKeylet<MPTokenIssuanceEntry>
(
27
e,
keylet::mptokenIssuance
(issuanceID),
"mptokenIssuance(MPTID)"
, issuanceID);
28
29
expectKeylet<MPTokenIssuanceEntry>
(
30
e,
keylet::mptokenIssuance
(e.
someID
()),
"mptokenIssuance(UInt256)"
, e.
someID
());
31
}
32
33
}
// namespace xrpl::test
xrpl::test::EntryTestEnv
Scaffolding shared by the per-entry-type suites.
Definition
EntryTestHelpers.h:28
xrpl::test::EntryTestEnv::alice
Account const alice
Definition
EntryTestHelpers.h:31
xrpl::test::EntryTestEnv::someID
UInt256 someID() const
An arbitrary but stable UInt256, for the entry constructors that take an object ID directly.
Definition
EntryTestHelpers.h:62
xrpl::test::jtx::Account::id
AccountID id() const
Returns the Account ID.
Definition
jtx/Account.h:104
cstdint
std::uint32_t
xrpl::keylet::mptokenIssuance
Keylet mptokenIssuance(MPTID const &issuanceID) noexcept
Definition
Indexes.cpp:567
xrpl::test
Definition
STLedgerEntry.h:21
xrpl::test::TEST
TEST(UnitsTest, types)
Definition
Units.cpp:16
xrpl::test::expectKeylet
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.
Definition
EntryTestHelpers.h:96
xrpl::MPTID
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
xrpl::makeMptID
MPTID makeMptID(std::uint32_t const sequence, AccountID const &account)
Definition
Indexes.cpp:206
Generated by
1.17.0