MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / appTests

Method appTests

src/qt/test/apptests.cpp:55–85  ·  view source on GitHub ↗

Entry point for BitcoinApplication tests.

Source from the content-addressed store, hash-verified

53
54//! Entry point for BitcoinApplication tests.
55void AppTests::appTests()
56{
57#ifdef Q_OS_MACOS
58 if (QApplication::platformName() == "minimal") {
59 // Disable for mac on "minimal" platform to avoid crashes inside the Qt
60 // framework when it tries to look up unimplemented cocoa functions,
61 // and fails to handle returned nulls
62 // (https://bugreports.qt.io/browse/QTBUG-49686).
63 qWarning() << "Skipping AppTests on mac build with 'minimal' platform set due to Qt bugs. To run AppTests, invoke "
64 "with 'QT_QPA_PLATFORM=cocoa test_bitcoin-qt' on mac, or else use a linux or windows build.";
65 return;
66 }
67#endif
68
69 qRegisterMetaType<interfaces::BlockAndHeaderTipInfo>("interfaces::BlockAndHeaderTipInfo");
70 m_app.parameterSetup();
71 QVERIFY(m_app.createOptionsModel(/*resetSettings=*/true));
72 QScopedPointer<const NetworkStyle> style(NetworkStyle::instantiate(Params().GetChainType()));
73 m_app.setupPlatformStyle();
74 m_app.createWindow(style.data());
75 connect(&m_app, &BitcoinApplication::windowShown, this, &AppTests::guiTests);
76 expectCallback("guiTests");
77 m_app.baseInitialize();
78 m_app.requestInitialize();
79 m_app.exec();
80 m_app.requestShutdown();
81 m_app.exec();
82
83 // Reset global state to avoid interfering with later tests.
84 LogInstance().DisconnectTestLogger();
85}
86
87//! Entry point for BitcoinGUI tests.
88void AppTests::guiTests(BitcoinGUI* window)

Callers

nothing calls this directly

Calls 12

parameterSetupMethod · 0.80
createOptionsModelMethod · 0.80
setupPlatformStyleMethod · 0.80
createWindowMethod · 0.80
requestInitializeMethod · 0.80
execMethod · 0.80
requestShutdownMethod · 0.80
DisconnectTestLoggerMethod · 0.80
ParamsClass · 0.50
GetChainTypeMethod · 0.45
dataMethod · 0.45
baseInitializeMethod · 0.45

Tested by

no test coverage detected