style: Fix JSON indent style in C++ code (#2485)

This commit is contained in:
Ayaz Salikhov
2025-08-28 15:10:36 +01:00
committed by GitHub
parent 2512a9c8e7
commit e6b2f9cde7
42 changed files with 3222 additions and 3192 deletions

View File

@@ -153,11 +153,11 @@ TEST_F(RPCTxTest, ExcessiveLgrRange)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}",
"min_ledger": 1,
"max_ledger": 1002
}})JSON",
"command": "tx",
"transaction": "{}",
"min_ledger": 1,
"max_ledger": 1002
}})JSON",
kTXN_ID
)
);
@@ -189,10 +189,10 @@ TEST_F(RPCTxTest, InvalidBinaryV1)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}",
"binary": 12
}})JSON",
"command": "tx",
"transaction": "{}",
"binary": 12
}})JSON",
kTXN_ID
)
);
@@ -208,10 +208,10 @@ TEST_F(RPCTxTest, InvalidBinaryV2)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}",
"binary": 12
}})JSON",
"command": "tx",
"transaction": "{}",
"binary": 12
}})JSON",
kTXN_ID
)
);
@@ -231,11 +231,11 @@ TEST_F(RPCTxTest, InvalidLgrRange)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}",
"max_ledger": 1,
"min_ledger": 10
}})JSON",
"command": "tx",
"transaction": "{}",
"max_ledger": 1,
"min_ledger": 10
}})JSON",
kTXN_ID
)
);
@@ -262,9 +262,9 @@ TEST_F(RPCTxTest, TxnNotFound)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}"
}})JSON",
"command": "tx",
"transaction": "{}"
}})JSON",
kTXN_ID
)
);
@@ -292,11 +292,11 @@ TEST_F(RPCTxTest, TxnNotFoundInGivenRangeSearchAllFalse)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}",
"min_ledger": 1,
"max_ledger": 1000
}})JSON",
"command": "tx",
"transaction": "{}",
"min_ledger": 1,
"max_ledger": 1000
}})JSON",
kTXN_ID
)
);
@@ -325,11 +325,11 @@ TEST_F(RPCTxTest, TxnNotFoundInGivenRangeSearchAllTrue)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}",
"min_ledger": 1,
"max_ledger": 1000
}})JSON",
"command": "tx",
"transaction": "{}",
"min_ledger": 1,
"max_ledger": 1000
}})JSON",
kTXN_ID
)
);
@@ -359,10 +359,10 @@ TEST_F(RPCTxTest, CtidNotFoundSearchAllFalse)
auto const req = json::parse(
fmt::format(
R"JSON({{
"ctid": "{}",
"min_ledger": 1,
"max_ledger": 1000
}})JSON",
"ctid": "{}",
"min_ledger": 1,
"max_ledger": 1000
}})JSON",
kCTID
)
);
@@ -396,9 +396,9 @@ TEST_F(RPCTxTest, DefaultParameter_API_v1)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}"
}})JSON",
"command": "tx",
"transaction": "{}"
}})JSON",
kTXN_ID
)
);
@@ -428,9 +428,9 @@ TEST_F(RPCTxTest, PaymentTx_API_v1)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}"
}})JSON",
"command": "tx",
"transaction": "{}"
}})JSON",
kTXN_ID
)
);
@@ -461,9 +461,9 @@ TEST_F(RPCTxTest, PaymentTx_API_v2)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}"
}})JSON",
"command": "tx",
"transaction": "{}"
}})JSON",
kTXN_ID
)
);
@@ -497,9 +497,9 @@ TEST_F(RPCTxTest, DefaultParameter_API_v2)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}"
}})JSON",
"command": "tx",
"transaction": "{}"
}})JSON",
kTXN_ID
)
);
@@ -540,10 +540,10 @@ TEST_F(RPCTxTest, ReturnBinary)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}",
"binary": true
}})JSON",
"command": "tx",
"transaction": "{}",
"binary": true
}})JSON",
kTXN_ID
)
);
@@ -585,10 +585,10 @@ TEST_F(RPCTxTest, ReturnBinaryWithCTID)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}",
"binary": true
}})JSON",
"command": "tx",
"transaction": "{}",
"binary": true
}})JSON",
kTXN_ID
)
);
@@ -672,9 +672,9 @@ TEST_F(RPCTxTest, MintNFT)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}"
}})JSON",
"command": "tx",
"transaction": "{}"
}})JSON",
kTXN_ID
)
);
@@ -701,9 +701,9 @@ TEST_F(RPCTxTest, NFTAcceptOffer)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}"
}})JSON",
"command": "tx",
"transaction": "{}"
}})JSON",
kTXN_ID
)
);
@@ -731,9 +731,9 @@ TEST_F(RPCTxTest, NFTCancelOffer)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}"
}})JSON",
"command": "tx",
"transaction": "{}"
}})JSON",
kTXN_ID
)
);
@@ -768,9 +768,9 @@ TEST_F(RPCTxTest, NFTCreateOffer)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}"
}})JSON",
"command": "tx",
"transaction": "{}"
}})JSON",
kTXN_ID
)
);
@@ -787,10 +787,10 @@ TEST_F(RPCTxTest, CTIDAndTransactionBothProvided)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}",
"ctid": "{}"
}})JSON",
"command": "tx",
"transaction": "{}",
"ctid": "{}"
}})JSON",
kTXN_ID,
kCTID
)
@@ -861,9 +861,9 @@ TEST_F(RPCTxTest, CTIDNotMatch)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"ctid": "{}"
}})JSON",
"command": "tx",
"ctid": "{}"
}})JSON",
kCTID
)
);
@@ -883,42 +883,42 @@ TEST_F(RPCTxTest, CTIDNotMatch)
TEST_F(RPCTxTest, ReturnCTIDForTxInput)
{
static constexpr auto kOUT = R"JSON({
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Fee": "2",
"Sequence": 100,
"SigningPubKey": "74657374",
"TakerGets": {
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
"value": "200"
},
"ctid": "C000006400640002",
"TakerPays": "300",
"TransactionType": "OfferCreate",
"hash": "2E2FBAAFF767227FE4381C4BE9855986A6B9F96C62F6E443731AB36F7BBB8A08",
"meta": {
"AffectedNodes": [
{
"CreatedNode": {
"LedgerEntryType": "Offer",
"NewFields": {
"TakerGets": "200",
"TakerPays": {
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "300"
}
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Fee": "2",
"Sequence": 100,
"SigningPubKey": "74657374",
"TakerGets": {
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
"value": "200"
},
"ctid": "C000006400640002",
"TakerPays": "300",
"TransactionType": "OfferCreate",
"hash": "2E2FBAAFF767227FE4381C4BE9855986A6B9F96C62F6E443731AB36F7BBB8A08",
"meta": {
"AffectedNodes": [
{
"CreatedNode": {
"LedgerEntryType": "Offer",
"NewFields": {
"TakerGets": "200",
"TakerPays": {
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "300"
}
}
}
],
"TransactionIndex": 100,
"TransactionResult": "tesSUCCESS"
},
"date": 123456,
"ledger_index": 100,
"inLedger": 100,
"validated": true
}
],
"TransactionIndex": 100,
"TransactionResult": "tesSUCCESS"
},
"date": 123456,
"ledger_index": 100,
"inLedger": 100,
"validated": true
})JSON";
TransactionAndMetadata tx;
@@ -938,9 +938,9 @@ TEST_F(RPCTxTest, ReturnCTIDForTxInput)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}"
}})JSON",
"command": "tx",
"transaction": "{}"
}})JSON",
kTXN_ID
)
);
@@ -953,41 +953,41 @@ TEST_F(RPCTxTest, ReturnCTIDForTxInput)
TEST_F(RPCTxTest, NotReturnCTIDIfETLNotAvailable)
{
static constexpr auto kOUT = R"JSON({
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Fee": "2",
"Sequence": 100,
"SigningPubKey": "74657374",
"TakerGets": {
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
"value": "200"
},
"TakerPays": "300",
"TransactionType": "OfferCreate",
"hash": "2E2FBAAFF767227FE4381C4BE9855986A6B9F96C62F6E443731AB36F7BBB8A08",
"meta": {
"AffectedNodes": [
{
"CreatedNode": {
"LedgerEntryType": "Offer",
"NewFields": {
"TakerGets": "200",
"TakerPays": {
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "300"
}
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Fee": "2",
"Sequence": 100,
"SigningPubKey": "74657374",
"TakerGets": {
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
"value": "200"
},
"TakerPays": "300",
"TransactionType": "OfferCreate",
"hash": "2E2FBAAFF767227FE4381C4BE9855986A6B9F96C62F6E443731AB36F7BBB8A08",
"meta": {
"AffectedNodes": [
{
"CreatedNode": {
"LedgerEntryType": "Offer",
"NewFields": {
"TakerGets": "200",
"TakerPays": {
"currency": "0158415500000000C1F76FF6ECB0BAC600000000",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "300"
}
}
}
],
"TransactionIndex": 100,
"TransactionResult": "tesSUCCESS"
},
"date": 123456,
"ledger_index": 100,
"inLedger": 100,
"validated": true
}
],
"TransactionIndex": 100,
"TransactionResult": "tesSUCCESS"
},
"date": 123456,
"ledger_index": 100,
"inLedger": 100,
"validated": true
})JSON";
TransactionAndMetadata tx;
@@ -1007,9 +1007,9 @@ TEST_F(RPCTxTest, NotReturnCTIDIfETLNotAvailable)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"transaction": "{}"
}})JSON",
"command": "tx",
"transaction": "{}"
}})JSON",
kTXN_ID
)
);
@@ -1088,9 +1088,9 @@ TEST_F(RPCTxTest, ViaCTID)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"ctid": "{}"
}})JSON",
"command": "tx",
"ctid": "{}"
}})JSON",
kCTID
)
);
@@ -1128,9 +1128,9 @@ TEST_F(RPCTxTest, ViaLowercaseCTID)
auto const req = json::parse(
fmt::format(
R"JSON({{
"command": "tx",
"ctid": "{}"
}})JSON",
"command": "tx",
"ctid": "{}"
}})JSON",
ctid
)
);