mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
style: Mark JSON literal strings with R"JSON (#2169)
This commit is contained in:
@@ -74,9 +74,9 @@ TEST_F(RPCAccountCurrenciesHandlerTest, AccountNotExist)
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
R"({{
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})",
|
||||
}})JSON",
|
||||
kACCOUNT
|
||||
));
|
||||
auto const handler = AnyHandler{AccountCurrenciesHandler{backend_}};
|
||||
@@ -96,9 +96,9 @@ TEST_F(RPCAccountCurrenciesHandlerTest, LedgerNonExistViaIntSequence)
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(30, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
R"({{
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})",
|
||||
}})JSON",
|
||||
kACCOUNT
|
||||
));
|
||||
auto const handler = AnyHandler{AccountCurrenciesHandler{backend_}};
|
||||
@@ -120,10 +120,10 @@ TEST_F(RPCAccountCurrenciesHandlerTest, LedgerNonExistViaStringSequence)
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(12, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
R"({{
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_index":"{}"
|
||||
}})",
|
||||
}})JSON",
|
||||
kACCOUNT,
|
||||
kSEQ
|
||||
));
|
||||
@@ -145,10 +145,10 @@ TEST_F(RPCAccountCurrenciesHandlerTest, LedgerNonExistViaHash)
|
||||
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
R"({{
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_hash":"{}"
|
||||
}})",
|
||||
}})JSON",
|
||||
kACCOUNT,
|
||||
kLEDGER_HASH
|
||||
));
|
||||
@@ -164,7 +164,7 @@ TEST_F(RPCAccountCurrenciesHandlerTest, LedgerNonExistViaHash)
|
||||
|
||||
TEST_F(RPCAccountCurrenciesHandlerTest, DefaultParameter)
|
||||
{
|
||||
static constexpr auto kOUTPUT = R"({
|
||||
static constexpr auto kOUTPUT = R"JSON({
|
||||
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
|
||||
"ledger_index":30,
|
||||
"validated":true,
|
||||
@@ -176,7 +176,7 @@ TEST_F(RPCAccountCurrenciesHandlerTest, DefaultParameter)
|
||||
"EUR",
|
||||
"USD"
|
||||
]
|
||||
})";
|
||||
})JSON";
|
||||
|
||||
// return valid ledgerHeader
|
||||
auto const ledgerHeader = createLedgerHeader(kLEDGER_HASH, 30);
|
||||
@@ -211,9 +211,9 @@ TEST_F(RPCAccountCurrenciesHandlerTest, DefaultParameter)
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
R"({{
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})",
|
||||
}})JSON",
|
||||
kACCOUNT
|
||||
));
|
||||
auto const handler = AnyHandler{AccountCurrenciesHandler{backend_}};
|
||||
@@ -246,10 +246,10 @@ TEST_F(RPCAccountCurrenciesHandlerTest, RequestViaLegderHash)
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
R"({{
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_hash":"{}"
|
||||
}})",
|
||||
}})JSON",
|
||||
kACCOUNT,
|
||||
kLEDGER_HASH
|
||||
));
|
||||
@@ -283,10 +283,10 @@ TEST_F(RPCAccountCurrenciesHandlerTest, RequestViaLegderSeq)
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
R"({{
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_index":{}
|
||||
}})",
|
||||
}})JSON",
|
||||
kACCOUNT,
|
||||
ledgerSeq
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user