mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-25 16:10:57 +00:00
chore: Enable clang-tidy misc checks (#6655)
This commit is contained in:
@@ -12,14 +12,14 @@ struct STInteger_test : public beast::unit_test::suite
|
||||
testUInt8()
|
||||
{
|
||||
testcase("UInt8");
|
||||
STUInt8 u8(255);
|
||||
STUInt8 const u8(255);
|
||||
BEAST_EXPECT(u8.value() == 255);
|
||||
BEAST_EXPECT(u8.getText() == "255");
|
||||
BEAST_EXPECT(u8.getSType() == STI_UINT8);
|
||||
BEAST_EXPECT(u8.getJson(JsonOptions::none) == 255);
|
||||
|
||||
// there is some special handling for sfTransactionResult
|
||||
STUInt8 tr(sfTransactionResult, 0);
|
||||
STUInt8 const tr(sfTransactionResult, 0);
|
||||
BEAST_EXPECT(tr.value() == 0);
|
||||
BEAST_EXPECT(
|
||||
tr.getText() == "The transaction was applied. Only final in a validated ledger.");
|
||||
@@ -27,7 +27,7 @@ struct STInteger_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(tr.getJson(JsonOptions::none) == "tesSUCCESS");
|
||||
|
||||
// invalid transaction result
|
||||
STUInt8 tr2(sfTransactionResult, 255);
|
||||
STUInt8 const tr2(sfTransactionResult, 255);
|
||||
BEAST_EXPECT(tr2.value() == 255);
|
||||
BEAST_EXPECT(tr2.getText() == "255");
|
||||
BEAST_EXPECT(tr2.getSType() == STI_UINT8);
|
||||
@@ -38,21 +38,21 @@ struct STInteger_test : public beast::unit_test::suite
|
||||
testUInt16()
|
||||
{
|
||||
testcase("UInt16");
|
||||
STUInt16 u16(65535);
|
||||
STUInt16 const u16(65535);
|
||||
BEAST_EXPECT(u16.value() == 65535);
|
||||
BEAST_EXPECT(u16.getText() == "65535");
|
||||
BEAST_EXPECT(u16.getSType() == STI_UINT16);
|
||||
BEAST_EXPECT(u16.getJson(JsonOptions::none) == 65535);
|
||||
|
||||
// there is some special handling for sfLedgerEntryType
|
||||
STUInt16 let(sfLedgerEntryType, ltACCOUNT_ROOT);
|
||||
STUInt16 const let(sfLedgerEntryType, ltACCOUNT_ROOT);
|
||||
BEAST_EXPECT(let.value() == ltACCOUNT_ROOT);
|
||||
BEAST_EXPECT(let.getText() == "AccountRoot");
|
||||
BEAST_EXPECT(let.getSType() == STI_UINT16);
|
||||
BEAST_EXPECT(let.getJson(JsonOptions::none) == "AccountRoot");
|
||||
|
||||
// there is some special handling for sfTransactionType
|
||||
STUInt16 tlt(sfTransactionType, ttPAYMENT);
|
||||
STUInt16 const tlt(sfTransactionType, ttPAYMENT);
|
||||
BEAST_EXPECT(tlt.value() == ttPAYMENT);
|
||||
BEAST_EXPECT(tlt.getText() == "Payment");
|
||||
BEAST_EXPECT(tlt.getSType() == STI_UINT16);
|
||||
@@ -63,19 +63,19 @@ struct STInteger_test : public beast::unit_test::suite
|
||||
testUInt32()
|
||||
{
|
||||
testcase("UInt32");
|
||||
STUInt32 u32(4'294'967'295u);
|
||||
STUInt32 const u32(4'294'967'295u);
|
||||
BEAST_EXPECT(u32.value() == 4'294'967'295u);
|
||||
BEAST_EXPECT(u32.getText() == "4294967295");
|
||||
BEAST_EXPECT(u32.getSType() == STI_UINT32);
|
||||
BEAST_EXPECT(u32.getJson(JsonOptions::none) == 4'294'967'295u);
|
||||
|
||||
// there is some special handling for sfPermissionValue
|
||||
STUInt32 pv(sfPermissionValue, ttPAYMENT + 1);
|
||||
STUInt32 const pv(sfPermissionValue, ttPAYMENT + 1);
|
||||
BEAST_EXPECT(pv.value() == ttPAYMENT + 1);
|
||||
BEAST_EXPECT(pv.getText() == "Payment");
|
||||
BEAST_EXPECT(pv.getSType() == STI_UINT32);
|
||||
BEAST_EXPECT(pv.getJson(JsonOptions::none) == "Payment");
|
||||
STUInt32 pv2(sfPermissionValue, PaymentMint);
|
||||
STUInt32 const pv2(sfPermissionValue, PaymentMint);
|
||||
BEAST_EXPECT(pv2.value() == PaymentMint);
|
||||
BEAST_EXPECT(pv2.getText() == "PaymentMint");
|
||||
BEAST_EXPECT(pv2.getSType() == STI_UINT32);
|
||||
@@ -86,7 +86,7 @@ struct STInteger_test : public beast::unit_test::suite
|
||||
testUInt64()
|
||||
{
|
||||
testcase("UInt64");
|
||||
STUInt64 u64(0xFFFFFFFFFFFFFFFFull);
|
||||
STUInt64 const u64(0xFFFFFFFFFFFFFFFFull);
|
||||
BEAST_EXPECT(u64.value() == 0xFFFFFFFFFFFFFFFFull);
|
||||
BEAST_EXPECT(u64.getText() == "18446744073709551615");
|
||||
BEAST_EXPECT(u64.getSType() == STI_UINT64);
|
||||
@@ -96,7 +96,7 @@ struct STInteger_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(jsonVal.isString());
|
||||
BEAST_EXPECT(jsonVal.asString() == "ffffffffffffffff");
|
||||
|
||||
STUInt64 u64_2(sfMaximumAmount, 0xFFFFFFFFFFFFFFFFull);
|
||||
STUInt64 const u64_2(sfMaximumAmount, 0xFFFFFFFFFFFFFFFFull);
|
||||
BEAST_EXPECT(u64_2.value() == 0xFFFFFFFFFFFFFFFFull);
|
||||
BEAST_EXPECT(u64_2.getText() == "18446744073709551615");
|
||||
BEAST_EXPECT(u64_2.getSType() == STI_UINT64);
|
||||
@@ -109,7 +109,7 @@ struct STInteger_test : public beast::unit_test::suite
|
||||
testcase("Int32");
|
||||
{
|
||||
int const minInt32 = -2147483648;
|
||||
STInt32 i32(minInt32);
|
||||
STInt32 const i32(minInt32);
|
||||
BEAST_EXPECT(i32.value() == minInt32);
|
||||
BEAST_EXPECT(i32.getText() == "-2147483648");
|
||||
BEAST_EXPECT(i32.getSType() == STI_INT32);
|
||||
@@ -118,7 +118,7 @@ struct STInteger_test : public beast::unit_test::suite
|
||||
|
||||
{
|
||||
int const maxInt32 = 2147483647;
|
||||
STInt32 i32(maxInt32);
|
||||
STInt32 const i32(maxInt32);
|
||||
BEAST_EXPECT(i32.value() == maxInt32);
|
||||
BEAST_EXPECT(i32.getText() == "2147483647");
|
||||
BEAST_EXPECT(i32.getSType() == STI_INT32);
|
||||
|
||||
Reference in New Issue
Block a user