refactor: Rename static constants (#7120)

Co-authored-by: Bart <bthomee@users.noreply.github.com>
This commit is contained in:
Alex Kremer
2026-05-15 16:32:19 +01:00
committed by GitHub
parent 028f0cb5da
commit 5b6e8b6f93
648 changed files with 6582 additions and 6686 deletions

View File

@@ -49,7 +49,7 @@ struct TxnTestData
// 3. sign_for, and
// 4. submit_multisigned.
// The JSON is not valid for all of these interfaces, but it should
// crash kNONE of them, and should provide reliable error messages.
// crash kNone of them, and should provide reliable error messages.
//
// The expMsg array contains the expected error string for the above cases.
std::array<char const* const, 4> const expMsg;
@@ -72,7 +72,7 @@ struct TxnTestData
operator=(TxnTestData&&) = delete;
};
static constexpr TxnTestData kTXN_TEST_ARRAY[] = {
static constexpr TxnTestData kTxnTestArray[] = {
{"Minimal payment, no Amount only DeliverMax",
__LINE__,
@@ -2777,26 +2777,26 @@ public:
using TestStuff = std::tuple<signFunc, submitFunc, char const*, unsigned int>;
static TestStuff const kTEST_FUNCS[] = {
static TestStuff const kTestFuncs[] = {
TestStuff{transactionSign, nullptr, "sign", 0},
TestStuff{nullptr, transactionSubmit, "submit", 1},
TestStuff{transactionSignFor, nullptr, "sign_for", 2},
TestStuff{nullptr, transactionSubmitMultiSigned, "submit_multisigned", 3}};
for (auto testFunc : kTEST_FUNCS)
for (auto testFunc : kTestFuncs)
{
// For each JSON test.
for (auto const& txnTest : kTXN_TEST_ARRAY)
for (auto const& txnTest : kTxnTestArray)
{
json::Value req;
json::Reader().parse(txnTest.json, req);
if (RPC::containsError(req))
Throw<std::runtime_error>("Internal JSONRPC_test error. Bad test JSON.");
static Role const kTESTED_ROLES[] = {
static Role const kTestedRoles[] = {
Role::GUEST, Role::USER, Role::ADMIN, Role::FORBID};
for (Role const testRole : kTESTED_ROLES)
for (Role const testRole : kTestedRoles)
{
json::Value result;
auto const signFn = get<0>(testFunc);