mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-19 19:25:53 +00:00
style: Mark JSON literal strings with R"JSON (#2169)
This commit is contained in:
@@ -120,7 +120,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ShouldForwardReturnsTrueIsNotAdminRipplePathFind",
|
||||
.apiVersion = 2u,
|
||||
.method = "ripple_path_find",
|
||||
.testJson = R"({"force_forward": true})",
|
||||
.testJson = R"JSON({"force_forward": true})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = !isAdmin,
|
||||
@@ -128,7 +128,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ShouldForwardReturnsTrueIsAdminRipplePathFind",
|
||||
.apiVersion = 2u,
|
||||
.method = "ripple_path_find",
|
||||
.testJson = R"({"force_forward": true})",
|
||||
.testJson = R"JSON({"force_forward": true})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = isAdmin,
|
||||
@@ -136,7 +136,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ShouldForwardReturnsTrueIfCurrentLedgerSpecified",
|
||||
.apiVersion = 2u,
|
||||
.method = "anymethod",
|
||||
.testJson = R"({"ledger_index": "current"})",
|
||||
.testJson = R"JSON({"ledger_index": "current"})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = !isAdmin,
|
||||
@@ -144,7 +144,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ShouldForwardReturnsTrueIfClosedLedgerSpecified",
|
||||
.apiVersion = 2u,
|
||||
.method = "anymethod",
|
||||
.testJson = R"({"ledger_index": "closed"})",
|
||||
.testJson = R"JSON({"ledger_index": "closed"})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = !isAdmin,
|
||||
@@ -152,7 +152,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ShouldForwardReturnsTrueIfAccountInfoWithQueueSpecified",
|
||||
.apiVersion = 2u,
|
||||
.method = "account_info",
|
||||
.testJson = R"({"queue": true})",
|
||||
.testJson = R"JSON({"queue": true})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = !isAdmin,
|
||||
@@ -160,7 +160,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ShouldForwardReturnsFalseIfAccountInfoQueueIsFalse",
|
||||
.apiVersion = 2u,
|
||||
.method = "account_info",
|
||||
.testJson = R"({"queue": false})",
|
||||
.testJson = R"JSON({"queue": false})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = !isAdmin,
|
||||
@@ -168,7 +168,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ShouldForwardReturnsTrueIfLedgerWithQueueSpecified",
|
||||
.apiVersion = 2u,
|
||||
.method = "ledger",
|
||||
.testJson = R"({"queue": true})",
|
||||
.testJson = R"JSON({"queue": true})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = !isAdmin,
|
||||
@@ -176,7 +176,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ShouldForwardReturnsFalseIfLedgerQueueIsFalse",
|
||||
.apiVersion = 2u,
|
||||
.method = "ledger",
|
||||
.testJson = R"({"queue": false})",
|
||||
.testJson = R"JSON({"queue": false})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = !isAdmin,
|
||||
@@ -216,7 +216,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ForceForwardTrue",
|
||||
.apiVersion = 1u,
|
||||
.method = "any_method",
|
||||
.testJson = R"({"force_forward": true})",
|
||||
.testJson = R"JSON({"force_forward": true})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = isAdmin,
|
||||
@@ -224,7 +224,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ForceForwardFalse",
|
||||
.apiVersion = 1u,
|
||||
.method = "any_method",
|
||||
.testJson = R"({"force_forward": false})",
|
||||
.testJson = R"JSON({"force_forward": false})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = isAdmin,
|
||||
@@ -232,7 +232,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ForceForwardNotAdmin",
|
||||
.apiVersion = 1u,
|
||||
.method = "any_method",
|
||||
.testJson = R"({"force_forward": true})",
|
||||
.testJson = R"JSON({"force_forward": true})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = !isAdmin,
|
||||
@@ -240,7 +240,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ForceForwardSubscribe",
|
||||
.apiVersion = 1u,
|
||||
.method = "subscribe",
|
||||
.testJson = R"({"force_forward": true})",
|
||||
.testJson = R"JSON({"force_forward": true})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 0,
|
||||
.isAdmin = isAdmin,
|
||||
@@ -248,7 +248,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ForceForwardUnsubscribe",
|
||||
.apiVersion = 1u,
|
||||
.method = "unsubscribe",
|
||||
.testJson = R"({"force_forward": true})",
|
||||
.testJson = R"JSON({"force_forward": true})JSON",
|
||||
.mockedIsClioOnly = !isClioOnly,
|
||||
.called = 0,
|
||||
.isAdmin = isAdmin,
|
||||
@@ -256,7 +256,7 @@ generateTestValuesForParametersTest()
|
||||
{.testName = "ForceForwardClioOnly",
|
||||
.apiVersion = 1u,
|
||||
.method = "clio_only_method",
|
||||
.testJson = R"({"force_forward": true})",
|
||||
.testJson = R"JSON({"force_forward": true})JSON",
|
||||
.mockedIsClioOnly = isClioOnly,
|
||||
.called = 1,
|
||||
.isAdmin = isAdmin,
|
||||
@@ -299,8 +299,8 @@ TEST_F(RPCForwardingProxyTest, ForwardCallsBalancerWithCorrectParams)
|
||||
auto const rawBalancerPtr = loadBalancer_.get();
|
||||
auto const apiVersion = 2u;
|
||||
auto const method = "submit";
|
||||
auto const params = json::parse(R"({"test": true})");
|
||||
auto const forwarded = json::parse(R"({"test": true, "command": "submit"})");
|
||||
auto const params = json::parse(R"JSON({"test": true})JSON");
|
||||
auto const forwarded = json::parse(R"JSON({"test": true, "command": "submit"})JSON");
|
||||
|
||||
EXPECT_CALL(
|
||||
*rawBalancerPtr, forwardToRippled(forwarded.as_object(), std::make_optional<std::string>(kCLIENT_IP), true, _)
|
||||
@@ -329,8 +329,8 @@ TEST_F(RPCForwardingProxyTest, ForwardingFailYieldsErrorStatus)
|
||||
auto const rawBalancerPtr = loadBalancer_.get();
|
||||
auto const apiVersion = 2u;
|
||||
auto const method = "submit";
|
||||
auto const params = json::parse(R"({"test": true})");
|
||||
auto const forwarded = json::parse(R"({"test": true, "command": "submit"})");
|
||||
auto const params = json::parse(R"JSON({"test": true})JSON");
|
||||
auto const forwarded = json::parse(R"JSON({"test": true, "command": "submit"})JSON");
|
||||
|
||||
EXPECT_CALL(
|
||||
*rawBalancerPtr, forwardToRippled(forwarded.as_object(), std::make_optional<std::string>(kCLIENT_IP), true, _)
|
||||
|
||||
Reference in New Issue
Block a user