mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-25 16:10:57 +00:00
chore: Enable most readability checks (#7772)
This commit is contained in:
@@ -83,7 +83,7 @@ TEST_F(BufferTest, buffer)
|
||||
x = b0;
|
||||
EXPECT_EQ(x, b0);
|
||||
EXPECT_TRUE(sane(x));
|
||||
#if defined(__clang__)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wself-assign-overloaded"
|
||||
#endif
|
||||
@@ -95,7 +95,7 @@ TEST_F(BufferTest, buffer)
|
||||
EXPECT_EQ(y, b3);
|
||||
EXPECT_TRUE(sane(y));
|
||||
|
||||
#if defined(__clang__)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -271,25 +271,6 @@ TEST_F(BaseUintTest, base_uint)
|
||||
static_assert(BaseUInt96("000000000000000000000001").signum() == 1);
|
||||
static_assert(BaseUInt96("800000000000000000000000").signum() == 1);
|
||||
|
||||
// Everything within the #if should fail during compilation.
|
||||
#if 0
|
||||
// Too few characters
|
||||
static_assert(BaseUInt96("00000000000000000000000").signum() == 0);
|
||||
|
||||
// Too many characters
|
||||
static_assert(BaseUInt96("0000000000000000000000000").signum() == 0);
|
||||
|
||||
// Non-hex characters
|
||||
static_assert(BaseUInt96("00000000000000000000000 ").signum() == 1);
|
||||
static_assert(BaseUInt96("00000000000000000000000/").signum() == 1);
|
||||
static_assert(BaseUInt96("00000000000000000000000:").signum() == 1);
|
||||
static_assert(BaseUInt96("00000000000000000000000@").signum() == 1);
|
||||
static_assert(BaseUInt96("00000000000000000000000G").signum() == 1);
|
||||
static_assert(BaseUInt96("00000000000000000000000`").signum() == 1);
|
||||
static_assert(BaseUInt96("00000000000000000000000g").signum() == 1);
|
||||
static_assert(BaseUInt96("00000000000000000000000~").signum() == 1);
|
||||
#endif // 0
|
||||
|
||||
// Using the constexpr constructor in a non-constexpr context
|
||||
// with an error in the parsing throws an exception.
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user