mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
chore: Enable clang-tidy misc checks (#6655)
This commit is contained in:
@@ -1057,7 +1057,7 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
Env env(*this, features);
|
||||
env.fund(XRP(5000), "alice", "bob");
|
||||
|
||||
std::array<std::uint8_t, 45> cb = {
|
||||
std::array<std::uint8_t, 45> const cb = {
|
||||
{0xA2, 0x2B, 0x80, 0x20, 0x42, 0x4A, 0x70, 0x49, 0x49, 0x52, 0x92, 0x67,
|
||||
0xB6, 0x21, 0xB3, 0xD7, 0x91, 0x19, 0xD7, 0x29, 0xB2, 0x38, 0x2C, 0xED,
|
||||
0x8B, 0x29, 0x6C, 0x3C, 0x02, 0x8F, 0xA9, 0x7D, 0x35, 0x0F, 0x6D, 0x07,
|
||||
@@ -1100,7 +1100,7 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(aa);
|
||||
|
||||
{
|
||||
xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id()));
|
||||
xrpl::Dir const aod(*env.current(), keylet::ownerDir(alice.id()));
|
||||
BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 1);
|
||||
BEAST_EXPECT(std::find(aod.begin(), aod.end(), aa) != aod.end());
|
||||
}
|
||||
@@ -1115,7 +1115,7 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(bb);
|
||||
|
||||
{
|
||||
xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
xrpl::Dir const bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 1);
|
||||
BEAST_EXPECT(std::find(bod.begin(), bod.end(), bb) != bod.end());
|
||||
}
|
||||
@@ -1127,11 +1127,11 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(
|
||||
(*env.meta())[sfTransactionResult] == static_cast<std::uint8_t>(tesSUCCESS));
|
||||
|
||||
xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id()));
|
||||
xrpl::Dir const aod(*env.current(), keylet::ownerDir(alice.id()));
|
||||
BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 0);
|
||||
BEAST_EXPECT(std::find(aod.begin(), aod.end(), aa) == aod.end());
|
||||
|
||||
xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
xrpl::Dir const bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 1);
|
||||
BEAST_EXPECT(std::find(bod.begin(), bod.end(), bb) != bod.end());
|
||||
}
|
||||
@@ -1143,7 +1143,7 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(
|
||||
(*env.meta())[sfTransactionResult] == static_cast<std::uint8_t>(tesSUCCESS));
|
||||
|
||||
xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
xrpl::Dir const bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 0);
|
||||
BEAST_EXPECT(std::find(bod.begin(), bod.end(), bb) == bod.end());
|
||||
}
|
||||
@@ -1174,16 +1174,16 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(bc);
|
||||
|
||||
{
|
||||
xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id()));
|
||||
xrpl::Dir const aod(*env.current(), keylet::ownerDir(alice.id()));
|
||||
BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 1);
|
||||
BEAST_EXPECT(std::find(aod.begin(), aod.end(), ab) != aod.end());
|
||||
|
||||
xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
xrpl::Dir const bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 2);
|
||||
BEAST_EXPECT(std::find(bod.begin(), bod.end(), ab) != bod.end());
|
||||
BEAST_EXPECT(std::find(bod.begin(), bod.end(), bc) != bod.end());
|
||||
|
||||
xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id()));
|
||||
xrpl::Dir const cod(*env.current(), keylet::ownerDir(carol.id()));
|
||||
BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 1);
|
||||
BEAST_EXPECT(std::find(cod.begin(), cod.end(), bc) != cod.end());
|
||||
}
|
||||
@@ -1194,16 +1194,16 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(!env.le(keylet::escrow(alice.id(), aseq)));
|
||||
BEAST_EXPECT(env.le(keylet::escrow(bruce.id(), bseq)));
|
||||
|
||||
xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id()));
|
||||
xrpl::Dir const aod(*env.current(), keylet::ownerDir(alice.id()));
|
||||
BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 0);
|
||||
BEAST_EXPECT(std::find(aod.begin(), aod.end(), ab) == aod.end());
|
||||
|
||||
xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
xrpl::Dir const bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 1);
|
||||
BEAST_EXPECT(std::find(bod.begin(), bod.end(), ab) == bod.end());
|
||||
BEAST_EXPECT(std::find(bod.begin(), bod.end(), bc) != bod.end());
|
||||
|
||||
xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id()));
|
||||
xrpl::Dir const cod(*env.current(), keylet::ownerDir(carol.id()));
|
||||
BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 1);
|
||||
}
|
||||
|
||||
@@ -1213,16 +1213,16 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(!env.le(keylet::escrow(alice.id(), aseq)));
|
||||
BEAST_EXPECT(!env.le(keylet::escrow(bruce.id(), bseq)));
|
||||
|
||||
xrpl::Dir aod(*env.current(), keylet::ownerDir(alice.id()));
|
||||
xrpl::Dir const aod(*env.current(), keylet::ownerDir(alice.id()));
|
||||
BEAST_EXPECT(std::distance(aod.begin(), aod.end()) == 0);
|
||||
BEAST_EXPECT(std::find(aod.begin(), aod.end(), ab) == aod.end());
|
||||
|
||||
xrpl::Dir bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
xrpl::Dir const bod(*env.current(), keylet::ownerDir(bruce.id()));
|
||||
BEAST_EXPECT(std::distance(bod.begin(), bod.end()) == 0);
|
||||
BEAST_EXPECT(std::find(bod.begin(), bod.end(), ab) == bod.end());
|
||||
BEAST_EXPECT(std::find(bod.begin(), bod.end(), bc) == bod.end());
|
||||
|
||||
xrpl::Dir cod(*env.current(), keylet::ownerDir(carol.id()));
|
||||
xrpl::Dir const cod(*env.current(), keylet::ownerDir(carol.id()));
|
||||
BEAST_EXPECT(std::distance(cod.begin(), cod.end()) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user