1#include <xrpl/beast/unit_test/suite.h>
2#include <xrpl/protocol/TER.h>
16 for (
auto i = -400; i < 400; ++i)
24 BEAST_EXPECT(inRange || !good);
25 BEAST_EXPECT(
transToken(t) == (good ? token :
"-"));
26 BEAST_EXPECT(
transHuman(t) == (good ? text :
"-"));
29 BEAST_EXPECT(good == !!code);
30 BEAST_EXPECT(!code || *code == t);
41 template <std::
size_t I1, std::
size_t I2>
45 template <
typename Tup>
73 template <std::
size_t, std::
size_t>
class Func,
78 Func<I1, I2>
const func;
87 template <std::
size_t, std::
size_t>
class Func,
92 Func<I1, I2>
const func;
101 template <std::
size_t, std::
size_t>
class Func,
106 Func<I1, I2>
const func;
125 auto isConvertible = [](
auto from,
auto to) {
140 isConvertible(notTec, notTec);
143 auto notConvertible = [](
auto from,
auto to) {
154 notConvertible(ter, notTec);
155 notConvertible(4, notTec);
164 isConvertible(notTec, ter);
165 isConvertible(ter, ter);
168 notConvertible(4, ter);
178 template <std::
size_t I1, std::
size_t I2>
182 template <
typename Tup>
187 auto const lhs = std::get<I1>(tup);
188 auto const rhs = std::get<I2>(tup);
bool expect(Condition const &shouldBeTrue)
Evaluate a test condition.
static constexpr TERSubset fromInt(int from)
void operator()(Tup const &tup, beast::unit_test::Suite &s) const
void operator()(Tup const &tup, beast::unit_test::Suite &) const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool operator<(Slice const &lhs, Slice const &rhs) noexcept
bool isTerRetry(TER x) noexcept
constexpr bool operator==(BaseUInt< Bits, Tag > const &lhs, BaseUInt< Bits, Tag > const &rhs)
bool operator>=(STAmount const &lhs, STAmount const &rhs)
std::string transHuman(TER code)
bool transResultInfo(TER code, std::string &token, std::string &text)
std::string transToken(TER code)
TERSubset< CanCvtToNotTEC > NotTEC
bool isTefFailure(TER x) noexcept
bool operator!=(Buffer const &lhs, Buffer const &rhs) noexcept
bool operator<=(STAmount const &lhs, STAmount const &rhs)
bool isTelLocal(TER x) noexcept
constexpr TERUnderlyingType TERtoInt(TELcodes v)
bool isTesSuccess(TER x) noexcept
TERSubset< CanCvtToTER > TER
std::optional< TER > transCode(std::string const &token)
bool isTecClaim(TER x) noexcept
BEAST_DEFINE_TESTSUITE(AccountTxPaging, app, xrpl)
bool isTemMalformed(TER x) noexcept
std::enable_if_t< I1==0 &&I2==0 > testIterate(Tup const &tup, beast::unit_test::Suite &s)
void testTransResultInfo()
std::enable_if_t< I1 !=0 > testIterate(Tup const &tup, beast::unit_test::Suite &s)
std::enable_if_t< I1==0 &&I2 !=0 > testIterate(Tup const &tup, beast::unit_test::Suite &s)
void run() override
Runs the suite.