mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 17:27:00 +00:00
chore: Enable clang-tidy misc checks (#6655)
This commit is contained in:
@@ -51,14 +51,14 @@ class LedgerMaster_test : public beast::unit_test::suite
|
||||
|
||||
// test invalid range
|
||||
{
|
||||
std::uint32_t ledgerSeq = -1;
|
||||
std::uint32_t txnIndex = 0;
|
||||
std::uint32_t const ledgerSeq = -1;
|
||||
std::uint32_t const txnIndex = 0;
|
||||
auto result = env.app().getLedgerMaster().txnIdFromIndex(ledgerSeq, txnIndex);
|
||||
BEAST_EXPECT(!result);
|
||||
}
|
||||
// test not in ledger
|
||||
{
|
||||
uint32_t txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
|
||||
uint32_t const txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
|
||||
auto result = env.app().getLedgerMaster().txnIdFromIndex(0, txnIndex);
|
||||
BEAST_EXPECT(!result);
|
||||
}
|
||||
@@ -69,13 +69,13 @@ class LedgerMaster_test : public beast::unit_test::suite
|
||||
}
|
||||
// ended without result
|
||||
{
|
||||
uint32_t txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
|
||||
uint32_t const txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
|
||||
auto result = env.app().getLedgerMaster().txnIdFromIndex(endLegSeq + 1, txnIndex);
|
||||
BEAST_EXPECT(!result);
|
||||
}
|
||||
// success (first tx)
|
||||
{
|
||||
uint32_t txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
|
||||
uint32_t const txnIndex = metas[0]->getFieldU32(sfTransactionIndex);
|
||||
auto result = env.app().getLedgerMaster().txnIdFromIndex(startLegSeq, txnIndex);
|
||||
BEAST_EXPECT(
|
||||
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
||||
@@ -86,7 +86,7 @@ class LedgerMaster_test : public beast::unit_test::suite
|
||||
}
|
||||
// success (second tx)
|
||||
{
|
||||
uint32_t txnIndex = metas[1]->getFieldU32(sfTransactionIndex);
|
||||
uint32_t const txnIndex = metas[1]->getFieldU32(sfTransactionIndex);
|
||||
auto result = env.app().getLedgerMaster().txnIdFromIndex(startLegSeq + 1, txnIndex);
|
||||
BEAST_EXPECT(
|
||||
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
||||
|
||||
Reference in New Issue
Block a user