Fix Linux/gcc compilation (#795)

Fixes #803
This commit is contained in:
Alex Kremer
2023-08-02 13:44:03 +01:00
committed by GitHub
parent 98d0a963dc
commit 24f69acd9e
81 changed files with 1259 additions and 1282 deletions

View File

@@ -40,7 +40,7 @@ class RPCTransactionEntryHandlerTest : public HandlerBaseTest
TEST_F(RPCTransactionEntryHandlerTest, TxHashNotProvide)
{
runSpawn([this](auto& yield) {
runSpawn([this](auto yield) {
auto const handler = AnyHandler{TransactionEntryHandler{mockBackendPtr}};
auto const output = handler.process(json::parse("{}"), Context{std::ref(yield)});
ASSERT_FALSE(output);
@@ -52,7 +52,7 @@ TEST_F(RPCTransactionEntryHandlerTest, TxHashNotProvide)
TEST_F(RPCTransactionEntryHandlerTest, TxHashWrongFormat)
{
runSpawn([this](auto& yield) {
runSpawn([this](auto yield) {
auto const handler = AnyHandler{TransactionEntryHandler{mockBackendPtr}};
auto const output = handler.process(json::parse(R"({"tx_hash":"123"})"), Context{std::ref(yield)});
ASSERT_FALSE(output);
@@ -77,7 +77,7 @@ TEST_F(RPCTransactionEntryHandlerTest, NonExistLedgerViaLedgerHash)
}})",
INDEX,
TXNID));
runSpawn([&, this](auto& yield) {
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{TransactionEntryHandler{mockBackendPtr}};
auto const output = handler.process(input, Context{std::ref(yield)});
ASSERT_FALSE(output);
@@ -102,7 +102,7 @@ TEST_F(RPCTransactionEntryHandlerTest, NonExistLedgerViaLedgerIndex)
"tx_hash": "{}"
}})",
TXNID));
runSpawn([&, this](auto& yield) {
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{TransactionEntryHandler{mockBackendPtr}};
auto const output = handler.process(input, Context{std::ref(yield)});
ASSERT_FALSE(output);
@@ -122,7 +122,7 @@ TEST_F(RPCTransactionEntryHandlerTest, TXNotFound)
ON_CALL(*rawBackendPtr, fetchTransaction(ripple::uint256{TXNID}, _))
.WillByDefault(Return(std::optional<TransactionAndMetadata>{}));
EXPECT_CALL(*rawBackendPtr, fetchTransaction).Times(1);
runSpawn([this](auto& yield) {
runSpawn([this](auto yield) {
auto const handler = AnyHandler{TransactionEntryHandler{mockBackendPtr}};
auto const req = json::parse(fmt::format(
R"({{
@@ -154,7 +154,7 @@ TEST_F(RPCTransactionEntryHandlerTest, LedgerSeqNotMatch)
ON_CALL(*rawBackendPtr, fetchLedgerBySequence).WillByDefault(Return(CreateLedgerInfo(INDEX, 30)));
EXPECT_CALL(*rawBackendPtr, fetchLedgerBySequence).Times(1);
runSpawn([this](auto& yield) {
runSpawn([this](auto yield) {
auto const handler = AnyHandler{TransactionEntryHandler{mockBackendPtr}};
auto const req = json::parse(fmt::format(
R"({{
@@ -231,7 +231,7 @@ TEST_F(RPCTransactionEntryHandlerTest, NormalPath)
ON_CALL(*rawBackendPtr, fetchLedgerBySequence).WillByDefault(Return(CreateLedgerInfo(INDEX, tx.ledgerSequence)));
EXPECT_CALL(*rawBackendPtr, fetchLedgerBySequence).Times(1);
runSpawn([&, this](auto& yield) {
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{TransactionEntryHandler{mockBackendPtr}};
auto const req = json::parse(fmt::format(
R"({{