Add compiler flags (#850)

Fixes #435
This commit is contained in:
Sergey Kuznetsov
2023-10-02 16:45:48 +01:00
committed by GitHub
parent d1c41a8bb7
commit 69f5025a29
53 changed files with 383 additions and 382 deletions

View File

@@ -52,7 +52,7 @@ protected:
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsFalseIfClioOnly)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "test";
auto const params = json::parse("{}");
@@ -72,7 +72,7 @@ TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsFalseIfClioOnly)
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfProxied)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "submit";
auto const params = json::parse("{}");
@@ -92,7 +92,7 @@ TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfProxied)
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfCurrentLedgerSpecified)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "anymethod";
auto const params = json::parse(R"({"ledger_index": "current"})");
@@ -112,7 +112,7 @@ TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfCurrentLedgerSpecified)
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfClosedLedgerSpecified)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "anymethod";
auto const params = json::parse(R"({"ledger_index": "closed"})");
@@ -132,7 +132,7 @@ TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfClosedLedgerSpecified)
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfAccountInfoWithQueueSpecified)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "account_info";
auto const params = json::parse(R"({"queue": true})");
@@ -152,7 +152,7 @@ TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfAccountInfoWithQueueSpe
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfLedgerWithQueueSpecified)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "ledger";
auto const params = json::parse(R"({"queue": true})");
@@ -172,7 +172,7 @@ TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfLedgerWithQueueSpecifie
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfLedgerWithFullSpecified)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "ledger";
auto const params = json::parse(R"({"full": true})");
@@ -192,7 +192,7 @@ TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfLedgerWithFullSpecified
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfLedgerWithAccountsSpecified)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "ledger";
auto const params = json::parse(R"({"accounts": true})");
@@ -212,7 +212,7 @@ TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsTrueIfLedgerWithAccountsSpeci
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsFalseIfAccountInfoQueueIsFalse)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "account_info";
auto const params = json::parse(R"({"queue": false})");
@@ -232,7 +232,7 @@ TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsFalseIfAccountInfoQueueIsFals
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsFalseIfLedgerQueueIsFalse)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "ledger";
auto const params = json::parse(R"({"queue": false})");
@@ -252,7 +252,7 @@ TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsFalseIfLedgerQueueIsFalse)
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsFalseIfLedgerFullIsFalse)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "ledger";
auto const params = json::parse(R"({"full": false})");
@@ -272,7 +272,7 @@ TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsFalseIfLedgerFullIsFalse)
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsFalseIfLedgerAccountsIsFalse)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "ledger";
auto const params = json::parse(R"({"accounts": false})");
@@ -296,7 +296,7 @@ TEST_F(RPCForwardingProxyTest, ShouldNotForwardReturnsTrueIfAPIVersionIsV1)
auto const method = "api_version_check";
auto const params = json::parse("{}");
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
ON_CALL(*rawHandlerProviderPtr, isClioOnly(_)).WillByDefault(Return(false));
EXPECT_CALL(*rawHandlerProviderPtr, isClioOnly(method)).Times(1);
@@ -312,7 +312,7 @@ TEST_F(RPCForwardingProxyTest, ShouldNotForwardReturnsTrueIfAPIVersionIsV1)
TEST_F(RPCForwardingProxyTest, ShouldForwardReturnsFalseIfAPIVersionIsV2)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const apiVersion = 2u;
auto const method = "api_version_check";
auto const params = json::parse("{}");
@@ -364,8 +364,8 @@ TEST_F(RPCForwardingProxyTest, ShouldNeverForwardUnsubscribe)
TEST_F(RPCForwardingProxyTest, ForwardCallsBalancerWithCorrectParams)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawBalancerPtr = static_cast<MockLoadBalancer*>(loadBalancer.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const rawBalancerPtr = loadBalancer.get();
auto const apiVersion = 2u;
auto const method = "submit";
auto const params = json::parse(R"({"test": true})");
@@ -394,8 +394,8 @@ TEST_F(RPCForwardingProxyTest, ForwardCallsBalancerWithCorrectParams)
TEST_F(RPCForwardingProxyTest, ForwardingFailYieldsErrorStatus)
{
auto const rawHandlerProviderPtr = static_cast<MockHandlerProvider*>(handlerProvider.get());
auto const rawBalancerPtr = static_cast<MockLoadBalancer*>(loadBalancer.get());
auto const rawHandlerProviderPtr = handlerProvider.get();
auto const rawBalancerPtr = loadBalancer.get();
auto const apiVersion = 2u;
auto const method = "submit";
auto const params = json::parse(R"({"test": true})");