Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
server_tests.cpp
Go to the documentation of this file.
1// Copyright (c) 2019 The Bitcoin developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#include <common/system.h>
6#include <rpc/server.h>
7#include <test/util/setup_common.h>
8
9#include <boost/test/unit_test.hpp>
10
11#include <cstdint>
12#include <vector>
13
14BOOST_FIXTURE_TEST_SUITE(server_tests, BasicTestingSetup)
15
18 testArgs.AddArg("-deprecatedrpc", "", ArgsManager::ALLOW_ANY,
20
21 const char *argv_test[] = {"bitcoind", "-deprecatedrpc=foo",
22 "-deprecatedrpc=bar"};
23
24 std::string error;
25 BOOST_CHECK_MESSAGE(testArgs.ParseParameters(3, (char **)argv_test, error),
26 error);
27
31}
32
@ ALLOW_ANY
Definition args.h:103
void AddArg(const std::string &name, const std::string &help, unsigned int flags, const OptionsCategory &cat)
Add argument.
Definition args.cpp:620
bool error(const char *fmt, const Args &...args)
Definition logging.h:263
#define BOOST_CHECK(expr)
Definition object.cpp:17
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
bool IsDeprecatedRPCEnabled(const ArgsManager &args, const std::string &method)
Definition server.cpp:407
BOOST_AUTO_TEST_CASE(server_IsDeprecatedRPCEnabled)