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

@@ -86,7 +86,7 @@ INSTANTIATE_TEST_CASE_P(
TEST_P(BookChangesParameterTest, InvalidParams)
{
auto const testBundle = GetParam();
runSpawn([&, this](auto& yield) {
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{BookChangesHandler{mockBackendPtr}};
auto const req = json::parse(testBundle.testJson);
auto const output = handler.process(req, Context{std::ref(yield)});
@@ -109,7 +109,7 @@ TEST_F(RPCBookChangesHandlerTest, LedgerNonExistViaIntSequence)
auto const static input = boost::json::parse(R"({"ledger_index":30})");
auto const handler = AnyHandler{BookChangesHandler{mockBackendPtr}};
runSpawn([&](auto& yield) {
runSpawn([&](auto yield) {
auto const output = handler.process(input, Context{std::ref(yield)});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
@@ -129,7 +129,7 @@ TEST_F(RPCBookChangesHandlerTest, LedgerNonExistViaStringSequence)
auto const static input = boost::json::parse(R"({"ledger_index":"30"})");
auto const handler = AnyHandler{BookChangesHandler{mockBackendPtr}};
runSpawn([&](auto& yield) {
runSpawn([&](auto yield) {
auto const output = handler.process(input, Context{std::ref(yield)});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
@@ -154,7 +154,7 @@ TEST_F(RPCBookChangesHandlerTest, LedgerNonExistViaHash)
}})",
LEDGERHASH));
auto const handler = AnyHandler{BookChangesHandler{mockBackendPtr}};
runSpawn([&](auto& yield) {
runSpawn([&](auto yield) {
auto const output = handler.process(input, Context{std::ref(yield)});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
@@ -205,7 +205,7 @@ TEST_F(RPCBookChangesHandlerTest, NormalPath)
ON_CALL(*rawBackendPtr, fetchAllTransactionsInLedger(MAXSEQ, _)).WillByDefault(Return(transactions));
auto const handler = AnyHandler{BookChangesHandler{mockBackendPtr}};
runSpawn([&](auto& yield) {
runSpawn([&](auto yield) {
auto const output = handler.process(json::parse("{}"), Context{std::ref(yield)});
ASSERT_TRUE(output);
EXPECT_EQ(*output, json::parse(expectedOut));