mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-27 15:28:49 +02:00
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).
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <interfaces/node.h>
|
||||
#include <qt/bitcoin.h>
|
||||
#include <qt/test/apptests.h>
|
||||
#include <qt/test/optiontests.h>
|
||||
#include <qt/test/rpcnestedtests.h>
|
||||
#include <qt/test/uritests.h>
|
||||
#include <test/util/setup_common.h>
|
||||
@@ -89,6 +90,10 @@ int main(int argc, char* argv[])
|
||||
if (QTest::qExec(&app_tests) != 0) {
|
||||
fInvalid = true;
|
||||
}
|
||||
OptionTests options_tests(app.node());
|
||||
if (QTest::qExec(&options_tests) != 0) {
|
||||
fInvalid = true;
|
||||
}
|
||||
URITests test1;
|
||||
if (QTest::qExec(&test1) != 0) {
|
||||
fInvalid = true;
|
||||
|
||||
Reference in New Issue
Block a user