1#include <xrpl/protocol/STXChainBridge.h>
3#include <xrpl/protocol/AccountID.h>
4#include <xrpl/protocol/Issue.h>
5#include <xrpl/protocol/UintTypes.h>
7#include <gtest/gtest.h>
22 EXPECT_TRUE(
id.parseHex(hex));
33 auto const lockingDoor =
account(
"0102030405060708090A0B0C0D0E0F1011121314");
34 auto const issuingDoor =
account(
"14131211100F0E0D0C0B0A090807060504030201");
36 auto const lockingIssue =
xrpIssue();
42 ", LockingChainIssue = " + lockingIssue.getText() +
43 ", IssuingChainDoor = " +
toBase58(issuingDoor) +
44 ", IssuingChainIssue = " + issuingIssue.
getText() +
" }";
46 EXPECT_EQ(
bridge.getText(), expected);
52 auto const text =
bridge.getText();
56 EXPECT_TRUE(text.starts_with(
"{ LockingChainDoor = "));
57 EXPECT_TRUE(text.ends_with(
" }"));
58 EXPECT_LT(text.find(
"LockingChainIssue"), text.find(
"IssuingChainDoor"));
59 EXPECT_LT(text.find(
"IssuingChainDoor"), text.find(
"IssuingChainIssue"));
A currency issued by an account.
std::string getText() const
Keylet bridge(STXChainBridge const &bridge, STXChainBridge::ChainType chainType)
Keylet account(AccountID const &id) noexcept
AccountID root.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Issue const & xrpIssue()
Returns an asset specifier that represents XRP.
TEST(FileUtilitiesTest, get_file_contents)
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
bool toCurrency(Currency &, std::string const &)
Tries to convert a string to a Currency, returns true on success.
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.