Files
rippled/src/tests/libxrpl/ledger/XChainOwnedCreateAccountClaimIDEntry.cpp
2026-09-22 22:39:23 +00:00

36 lines
990 B
C++

#include <xrpl/ledger/entries/XChainOwnedCreateAccountClaimIDEntry.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/Issue.h>
#include <xrpl/protocol/Keylet.h>
#include <xrpl/protocol/STXChainBridge.h>
#include <gtest/gtest.h>
#include <helpers/IOU.h>
#include <ledger/EntryTestHelpers.h>
#include <cstdint>
namespace xrpl::test {
TEST(XChainOwnedCreateAccountClaimIDEntryTests, constructors)
{
EntryTestEnv e;
STXChainBridge const bridge{e.alice.id(), xrpIssue(), e.bob.id(), IOU("USD", e.bob).issue()};
expectKeylet<XChainOwnedCreateAccountClaimIDEntry>(
e,
keylet::xChainCreateAccountClaimID(bridge, 5u),
"xChainCreateAccountClaimID(bridge, seq)",
bridge,
std::uint64_t{5});
// Must not collide with the plain claim-ID keylet, which takes the same
// arguments.
EXPECT_NE(
keylet::xChainCreateAccountClaimID(bridge, 5u).key, keylet::xChainClaimID(bridge, 5u).key);
}
} // namespace xrpl::test