2022-12-24 23:49:50 +00:00
|
|
|
// Copyright (c) 2019-2022 The Bitcoin Core developers
|
test: Add tests for GetArg methods / settings.json type coercion
Just add tests. No changes to application behavior. Tests will be
updated in the next commit changing & improving current behavior.
Include a Qt test for GUI startup crash reported by Rspigler in
https://github.com/bitcoin/bitcoin/issues/24457 caused by GetArg
behavior that happens if settings.json contains an integer value for any
of the configuration options which GUI settings can currently clash with
(-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen,
-server, -proxy, -proxy, -onion, -onion, -lang, and -prune).
2022-03-07 13:29:46 -05:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#ifndef BITCOIN_QT_TEST_OPTIONTESTS_H
|
|
|
|
#define BITCOIN_QT_TEST_OPTIONTESTS_H
|
|
|
|
|
|
|
|
#include <qt/optionsmodel.h>
|
2019-04-29 15:29:00 -04:00
|
|
|
#include <univalue.h>
|
|
|
|
#include <util/settings.h>
|
test: Add tests for GetArg methods / settings.json type coercion
Just add tests. No changes to application behavior. Tests will be
updated in the next commit changing & improving current behavior.
Include a Qt test for GUI startup crash reported by Rspigler in
https://github.com/bitcoin/bitcoin/issues/24457 caused by GetArg
behavior that happens if settings.json contains an integer value for any
of the configuration options which GUI settings can currently clash with
(-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen,
-server, -proxy, -proxy, -onion, -onion, -lang, and -prune).
2022-03-07 13:29:46 -05:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
class OptionTests : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-04-29 15:29:00 -04:00
|
|
|
explicit OptionTests(interfaces::Node& node);
|
test: Add tests for GetArg methods / settings.json type coercion
Just add tests. No changes to application behavior. Tests will be
updated in the next commit changing & improving current behavior.
Include a Qt test for GUI startup crash reported by Rspigler in
https://github.com/bitcoin/bitcoin/issues/24457 caused by GetArg
behavior that happens if settings.json contains an integer value for any
of the configuration options which GUI settings can currently clash with
(-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen,
-server, -proxy, -proxy, -onion, -onion, -lang, and -prune).
2022-03-07 13:29:46 -05:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
2019-04-29 15:29:00 -04:00
|
|
|
void init(); // called before each test function execution.
|
|
|
|
void migrateSettings();
|
2019-04-29 15:29:00 -04:00
|
|
|
void integerGetArgBug();
|
2022-03-24 18:33:14 +01:00
|
|
|
void parametersInteraction();
|
2022-06-21 19:15:06 -03:00
|
|
|
void extractFilter();
|
test: Add tests for GetArg methods / settings.json type coercion
Just add tests. No changes to application behavior. Tests will be
updated in the next commit changing & improving current behavior.
Include a Qt test for GUI startup crash reported by Rspigler in
https://github.com/bitcoin/bitcoin/issues/24457 caused by GetArg
behavior that happens if settings.json contains an integer value for any
of the configuration options which GUI settings can currently clash with
(-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen,
-server, -proxy, -proxy, -onion, -onion, -lang, and -prune).
2022-03-07 13:29:46 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
interfaces::Node& m_node;
|
2019-04-29 15:29:00 -04:00
|
|
|
util::Settings m_previous_settings;
|
test: Add tests for GetArg methods / settings.json type coercion
Just add tests. No changes to application behavior. Tests will be
updated in the next commit changing & improving current behavior.
Include a Qt test for GUI startup crash reported by Rspigler in
https://github.com/bitcoin/bitcoin/issues/24457 caused by GetArg
behavior that happens if settings.json contains an integer value for any
of the configuration options which GUI settings can currently clash with
(-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen,
-server, -proxy, -proxy, -onion, -onion, -lang, and -prune).
2022-03-07 13:29:46 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BITCOIN_QT_TEST_OPTIONTESTS_H
|