chore: No ALL_CAPS (#1760)

Fixes #1680
This commit is contained in:
Alex Kremer
2025-01-02 11:39:31 +00:00
committed by GitHub
parent efe5d08205
commit 820b32c6d7
361 changed files with 10061 additions and 9724 deletions

View File

@@ -35,7 +35,7 @@ using namespace testing;
namespace {
constexpr auto SEQ = 30;
constexpr auto kSEQ = 30;
struct CursorProviderTest : util::prometheus::WithPrometheus, MockBackendTestNaggy {
DiffProvider diffProvider;
@@ -58,29 +58,29 @@ TEST_P(ParametrizedCursorProviderTest, GetCursorsWithDifferentProviderSettings)
{
auto const numDiffs = GetParam();
auto const diffs = diffProvider.getLatestDiff();
auto const provider = etl::impl::CursorFromFixDiffNumProvider{backend, numDiffs};
auto const provider = etl::impl::CursorFromFixDiffNumProvider{backend_, numDiffs};
ON_CALL(*backend, fetchLedgerDiff(_, _)).WillByDefault(Return(diffs));
EXPECT_CALL(*backend, fetchLedgerDiff(_, _)).Times(numDiffs);
ON_CALL(*backend_, fetchLedgerDiff(_, _)).WillByDefault(Return(diffs));
EXPECT_CALL(*backend_, fetchLedgerDiff(_, _)).Times(numDiffs);
auto const cursors = provider.getCursors(SEQ);
auto const cursors = provider.getCursors(kSEQ);
ASSERT_EQ(cursors.size(), diffs.size() + 1);
EXPECT_EQ(cursors.front().start, firstKey);
EXPECT_EQ(cursors.back().end, lastKey);
EXPECT_EQ(cursors.front().start, kFIRST_KEY);
EXPECT_EQ(cursors.back().end, kLAST_KEY);
}
TEST_F(CursorProviderTest, EmptyCursorIsHandledCorrectly)
{
auto const diffs = diffProvider.getLatestDiff();
auto const provider = etl::impl::CursorFromFixDiffNumProvider{backend, 0};
auto const provider = etl::impl::CursorFromFixDiffNumProvider{backend_, 0};
ON_CALL(*backend, fetchLedgerDiff(_, _)).WillByDefault(Return(diffs));
EXPECT_CALL(*backend, fetchLedgerDiff(_, _)).Times(0);
ON_CALL(*backend_, fetchLedgerDiff(_, _)).WillByDefault(Return(diffs));
EXPECT_CALL(*backend_, fetchLedgerDiff(_, _)).Times(0);
auto const cursors = provider.getCursors(SEQ);
auto const cursors = provider.getCursors(kSEQ);
ASSERT_EQ(cursors.size(), 1);
EXPECT_EQ(cursors.front().start, firstKey);
EXPECT_EQ(cursors.back().end, lastKey);
EXPECT_EQ(cursors.front().start, kFIRST_KEY);
EXPECT_EQ(cursors.back().end, kLAST_KEY);
}