File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,15 @@ OptionTests::OptionTests(interfaces::Node& node) : m_node(node)
2020 gArgs .LockSettings ([&](util::Settings& s) { m_previous_settings = s; });
2121}
2222
23- void OptionTests::resetArgs ()
23+ void OptionTests::init ()
2424{
25+ // reset args
2526 gArgs .LockSettings ([&](util::Settings& s) { s = m_previous_settings; });
2627 gArgs .ClearPathCache ();
2728}
2829
2930void OptionTests::migrateSettings ()
3031{
31- resetArgs ();
32-
3332 // Set legacy QSettings and verify that they get cleared and migrated to
3433 // settings.json
3534 QSettings settings;
@@ -73,8 +72,6 @@ void OptionTests::migrateSettings()
7372
7473void OptionTests::integerGetArgBug ()
7574{
76- resetArgs ();
77-
7875 // Test regression https://github.com/bitcoin/bitcoin/issues/24457. Ensure
7976 // that setting integer prune value doesn't cause an exception to be thrown
8077 // in the OptionsModel constructor
@@ -93,8 +90,6 @@ void OptionTests::integerGetArgBug()
9390
9491void OptionTests::parametersInteraction ()
9592{
96- resetArgs ();
97-
9893 // Test that the bug https://github.com/bitcoin-core/gui/issues/567 does not resurface.
9994 // It was fixed via https://github.com/bitcoin-core/gui/pull/568.
10095 // With fListen=false in ~/.config/Bitcoin/Bitcoin-Qt.conf and all else left as default,
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ class OptionTests : public QObject
1616 Q_OBJECT
1717public:
1818 explicit OptionTests (interfaces::Node& node);
19- void resetArgs ();
2019
2120private Q_SLOTS:
21+ void init (); // called before each test function execution.
2222 void migrateSettings ();
2323 void integerGetArgBug ();
2424 void parametersInteraction ();
You can’t perform that action at this time.
0 commit comments