mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 16:56:48 +00:00
chore: Apply clang-format width 100 (#6387)
This commit is contained in:
@@ -14,8 +14,8 @@ struct TER_test : public beast::unit_test::suite
|
||||
for (auto i = -400; i < 400; ++i)
|
||||
{
|
||||
TER t = TER::fromInt(i);
|
||||
auto inRange = isTelLocal(t) || isTemMalformed(t) || isTefFailure(t) || isTerRetry(t) || isTesSuccess(t) ||
|
||||
isTecClaim(t);
|
||||
auto inRange = isTelLocal(t) || isTemMalformed(t) || isTefFailure(t) || isTerRetry(t) ||
|
||||
isTesSuccess(t) || isTecClaim(t);
|
||||
|
||||
std::string token, text;
|
||||
auto good = transResultInfo(t, token, text);
|
||||
@@ -48,11 +48,16 @@ struct TER_test : public beast::unit_test::suite
|
||||
// unless they are the same types.
|
||||
using To_t = std::decay_t<decltype(std::get<I1>(tup))>;
|
||||
using From_t = std::decay_t<decltype(std::get<I2>(tup))>;
|
||||
static_assert(std::is_same<From_t, To_t>::value == std::is_convertible<From_t, To_t>::value, "Convert err");
|
||||
static_assert(
|
||||
std::is_same<To_t, From_t>::value == std::is_constructible<To_t, From_t>::value, "Construct err");
|
||||
std::is_same<From_t, To_t>::value == std::is_convertible<From_t, To_t>::value,
|
||||
"Convert err");
|
||||
static_assert(
|
||||
std::is_same<To_t, From_t>::value == std::is_assignable<To_t&, From_t const&>::value, "Assign err");
|
||||
std::is_same<To_t, From_t>::value == std::is_constructible<To_t, From_t>::value,
|
||||
"Construct err");
|
||||
static_assert(
|
||||
std::is_same<To_t, From_t>::value ==
|
||||
std::is_assignable<To_t&, From_t const&>::value,
|
||||
"Assign err");
|
||||
|
||||
// Assignment or conversion from integer to type should never work.
|
||||
static_assert(!std::is_convertible<int, To_t>::value, "Convert err");
|
||||
@@ -62,7 +67,11 @@ struct TER_test : public beast::unit_test::suite
|
||||
};
|
||||
|
||||
// Fast iteration over the tuple.
|
||||
template <std::size_t I1, std::size_t I2, template <std::size_t, std::size_t> class Func, typename Tup>
|
||||
template <
|
||||
std::size_t I1,
|
||||
std::size_t I2,
|
||||
template <std::size_t, std::size_t> class Func,
|
||||
typename Tup>
|
||||
std::enable_if_t<I1 != 0>
|
||||
testIterate(Tup const& tup, beast::unit_test::suite& s)
|
||||
{
|
||||
@@ -72,7 +81,11 @@ struct TER_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
// Slow iteration over the tuple.
|
||||
template <std::size_t I1, std::size_t I2, template <std::size_t, std::size_t> class Func, typename Tup>
|
||||
template <
|
||||
std::size_t I1,
|
||||
std::size_t I2,
|
||||
template <std::size_t, std::size_t> class Func,
|
||||
typename Tup>
|
||||
std::enable_if_t<I1 == 0 && I2 != 0>
|
||||
testIterate(Tup const& tup, beast::unit_test::suite& s)
|
||||
{
|
||||
@@ -82,7 +95,11 @@ struct TER_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
// Finish iteration over the tuple.
|
||||
template <std::size_t I1, std::size_t I2, template <std::size_t, std::size_t> class Func, typename Tup>
|
||||
template <
|
||||
std::size_t I1,
|
||||
std::size_t I2,
|
||||
template <std::size_t, std::size_t> class Func,
|
||||
typename Tup>
|
||||
std::enable_if_t<I1 == 0 && I2 == 0>
|
||||
testIterate(Tup const& tup, beast::unit_test::suite& s)
|
||||
{
|
||||
@@ -97,8 +114,8 @@ struct TER_test : public beast::unit_test::suite
|
||||
// are not valid.
|
||||
|
||||
// Examples of each kind of enum.
|
||||
static auto const terEnums =
|
||||
std::make_tuple(telLOCAL_ERROR, temMALFORMED, tefFAILURE, terRETRY, tesSUCCESS, tecCLAIM);
|
||||
static auto const terEnums = std::make_tuple(
|
||||
telLOCAL_ERROR, temMALFORMED, tefFAILURE, terRETRY, tesSUCCESS, tecCLAIM);
|
||||
static int const hiIndex{std::tuple_size<decltype(terEnums)>::value - 1};
|
||||
|
||||
// Verify that enums cannot be converted to other enum types.
|
||||
|
||||
Reference in New Issue
Block a user