Update doxygen comments (#818)

Fixes #421
This commit is contained in:
Alex Kremer
2023-08-11 21:32:32 +01:00
committed by GitHub
parent c20b14494a
commit 547cb340bd
206 changed files with 3004 additions and 1937 deletions

View File

@@ -24,7 +24,7 @@
#include <fmt/core.h>
using namespace RPC;
using namespace rpc;
namespace json = boost::json;
using namespace testing;
@@ -59,7 +59,7 @@ TEST_F(RPCAccountLinesHandlerTest, NonHexLedgerHash)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "invalidParams");
EXPECT_EQ(err.at("error_message").as_string(), "ledger_hashMalformed");
});
@@ -79,7 +79,7 @@ TEST_F(RPCAccountLinesHandlerTest, NonStringLedgerHash)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "invalidParams");
EXPECT_EQ(err.at("error_message").as_string(), "ledger_hashNotString");
});
@@ -99,7 +99,7 @@ TEST_F(RPCAccountLinesHandlerTest, InvalidLedgerIndexString)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "invalidParams");
EXPECT_EQ(err.at("error_message").as_string(), "ledgerIndexMalformed");
});
@@ -118,7 +118,7 @@ TEST_F(RPCAccountLinesHandlerTest, MarkerNotString)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "invalidParams");
EXPECT_EQ(err.at("error_message").as_string(), "markerNotString");
});
@@ -140,7 +140,7 @@ TEST_F(RPCAccountLinesHandlerTest, InvalidMarker)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "invalidParams");
EXPECT_EQ(err.at("error_message").as_string(), "Malformed cursor.");
});
@@ -155,7 +155,7 @@ TEST_F(RPCAccountLinesHandlerTest, InvalidMarker)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "invalidParams");
});
}
@@ -171,7 +171,7 @@ TEST_F(RPCAccountLinesHandlerTest, AccountInvalidFormat)
})");
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "actMalformed");
EXPECT_EQ(err.at("error_message").as_string(), "Account malformed.");
});
@@ -189,7 +189,7 @@ TEST_F(RPCAccountLinesHandlerTest, AccountNotString)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "actMalformed");
EXPECT_EQ(err.at("error_message").as_string(), "Account malformed.");
});
@@ -206,7 +206,7 @@ TEST_F(RPCAccountLinesHandlerTest, PeerInvalidFormat)
})");
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "actMalformed");
EXPECT_EQ(err.at("error_message").as_string(), "Account malformed.");
});
@@ -224,7 +224,7 @@ TEST_F(RPCAccountLinesHandlerTest, PeerNotString)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "actMalformed");
EXPECT_EQ(err.at("error_message").as_string(), "Account malformed.");
});
@@ -242,7 +242,7 @@ TEST_F(RPCAccountLinesHandlerTest, LimitNotInt)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "invalidParams");
});
}
@@ -259,7 +259,7 @@ TEST_F(RPCAccountLinesHandlerTest, LimitNagetive)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "invalidParams");
});
}
@@ -276,7 +276,7 @@ TEST_F(RPCAccountLinesHandlerTest, LimitZero)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "invalidParams");
});
}
@@ -302,7 +302,7 @@ TEST_F(RPCAccountLinesHandlerTest, NonExistLedgerViaLedgerHash)
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "lgrNotFound");
EXPECT_EQ(err.at("error_message").as_string(), "ledgerNotFound");
});
@@ -327,7 +327,7 @@ TEST_F(RPCAccountLinesHandlerTest, NonExistLedgerViaLedgerStringIndex)
auto const handler = AnyHandler{AccountLinesHandler{mockBackendPtr}};
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "lgrNotFound");
EXPECT_EQ(err.at("error_message").as_string(), "ledgerNotFound");
});
@@ -351,7 +351,7 @@ TEST_F(RPCAccountLinesHandlerTest, NonExistLedgerViaLedgerIntIndex)
auto const handler = AnyHandler{AccountLinesHandler{mockBackendPtr}};
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "lgrNotFound");
EXPECT_EQ(err.at("error_message").as_string(), "ledgerNotFound");
});
@@ -379,7 +379,7 @@ TEST_F(RPCAccountLinesHandlerTest, NonExistLedgerViaLedgerHash2)
auto const handler = AnyHandler{AccountLinesHandler{mockBackendPtr}};
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "lgrNotFound");
EXPECT_EQ(err.at("error_message").as_string(), "ledgerNotFound");
});
@@ -404,7 +404,7 @@ TEST_F(RPCAccountLinesHandlerTest, NonExistLedgerViaLedgerIndex2)
auto const handler = AnyHandler{AccountLinesHandler{mockBackendPtr}};
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "lgrNotFound");
EXPECT_EQ(err.at("error_message").as_string(), "ledgerNotFound");
});
@@ -433,7 +433,7 @@ TEST_F(RPCAccountLinesHandlerTest, NonExistAccount)
auto const handler = AnyHandler{AccountLinesHandler{mockBackendPtr}};
auto const output = handler.process(input, Context{yield});
ASSERT_FALSE(output);
auto const err = RPC::makeError(output.error());
auto const err = rpc::makeError(output.error());
EXPECT_EQ(err.at("error").as_string(), "actNotFound");
EXPECT_EQ(err.at("error_message").as_string(), "accountNotFound");
});