Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/test_main.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | int main(int argc, char *argv[]) { | ||||
std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(); | std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(); | ||||
bool fInvalid = false; | bool fInvalid = false; | ||||
// Prefer the "minimal" platform for the test instead of the normal default | // Prefer the "minimal" platform for the test instead of the normal default | ||||
// platform ("xcb", "windows", or "cocoa") so tests can't unintentionally | // platform ("xcb", "windows", or "cocoa") so tests can't unintentionally | ||||
// interfere with any background GUIs and don't require extra resources. | // interfere with any background GUIs and don't require extra resources. | ||||
setenv("QT_QPA_PLATFORM", "minimal", 0); | setenv("QT_QPA_PLATFORM", "minimal", /* overwrite */ 0); | ||||
// Don't remove this, it's needed to access | // Don't remove this, it's needed to access | ||||
// QApplication:: and QCoreApplication:: in the tests | // QApplication:: and QCoreApplication:: in the tests | ||||
BitcoinApplication app(*node); | BitcoinApplication app(*node); | ||||
app.setApplicationName("BitcoinABC-Qt-test"); | app.setApplicationName("BitcoinABC-Qt-test"); | ||||
AppTests app_tests(app); | AppTests app_tests(app); | ||||
if (QTest::qExec(&app_tests) != 0) { | if (QTest::qExec(&app_tests) != 0) { | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |