style: Mark JSON literal strings with R"JSON (#2169)

This commit is contained in:
Ayaz Salikhov
2025-05-30 15:50:39 +01:00
committed by GitHub
parent 7588e9d5bf
commit ecdea015b9
76 changed files with 2811 additions and 2748 deletions

View File

@@ -96,21 +96,21 @@ public:
TEST_F(BackendCassandraFactoryTest, NoSuchBackend)
{
useConfig(R"json( {"database": {"type": "unknown"}} )json");
useConfig(R"JSON( {"database": {"type": "unknown"}} )JSON");
auto cache = data::LedgerCache{};
EXPECT_THROW(data::makeBackend(cfg_, cache), std::runtime_error);
}
TEST_F(BackendCassandraFactoryTest, CreateCassandraBackendDBDisconnect)
{
useConfig(R"json(
useConfig(R"JSON(
{"database": {
"type": "cassandra",
"cassandra": {
"contact_points": "127.0.0.2"
}
}}
)json");
)JSON");
auto cache = data::LedgerCache{};
EXPECT_THROW(data::makeBackend(cfg_, cache), std::runtime_error);
@@ -146,7 +146,7 @@ TEST_F(BackendCassandraFactoryTestWithDB, CreateCassandraBackend)
TEST_F(BackendCassandraFactoryTestWithDB, CreateCassandraBackendReadOnlyWithEmptyDB)
{
useConfig(R"json( {"read_only": true} )json");
useConfig(R"JSON( {"read_only": true} )JSON");
auto cache = data::LedgerCache{};
EXPECT_THROW(data::makeBackend(cfg_, cache), std::runtime_error);
}
@@ -154,7 +154,7 @@ TEST_F(BackendCassandraFactoryTestWithDB, CreateCassandraBackendReadOnlyWithEmpt
TEST_F(BackendCassandraFactoryTestWithDB, CreateCassandraBackendReadOnlyWithDBReady)
{
auto cfgReadOnly = cfg_;
ASSERT_FALSE(cfgReadOnly.parse(ConfigFileJson{boost::json::parse(R"json( {"read_only": true} )json").as_object()}));
ASSERT_FALSE(cfgReadOnly.parse(ConfigFileJson{boost::json::parse(R"JSON( {"read_only": true} )JSON").as_object()}));
auto cache = data::LedgerCache{};
EXPECT_TRUE(data::makeBackend(cfg_, cache));