style: Fix clang-tidy issue (#1515)

Fixes #1513
This commit is contained in:
Sergey Kuznetsov
2024-07-03 16:22:25 +01:00
committed by GitHub
parent f55872d496
commit 4dd3254354

View File

@@ -131,9 +131,10 @@ TEST_P(LedgerIndexTests, SearchFromLedgerRange)
// step 2
for (uint32_t i = RANGEMIN; i <= RANGEMAX; i++) {
auto const ledgerHeader = CreateLedgerHeaderWithUnixTime(LEDGERHASH, i, 1719318190 + 2 * (i - RANGEMIN));
ON_CALL(*backend, fetchLedgerBySequence(i, _)).WillByDefault(Return(ledgerHeader));
auto const exactNumberOfCalls = i == RANGEMIN ? Exactly(3) : Exactly(2);
EXPECT_CALL(*backend, fetchLedgerBySequence(i, _))
.Times(i == testBundle.expectedLedgerIndex ? (i == RANGEMIN ? Exactly(3) : Exactly(2)) : AtMost(1));
.Times(i == testBundle.expectedLedgerIndex ? exactNumberOfCalls : AtMost(1))
.WillRepeatedly(Return(ledgerHeader));
}
auto const handler = AnyHandler{LedgerIndexHandler{backend}};