Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/test_main.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | int main(int argc, char *argv[]) { | ||||
SelectParams(CBaseChainParams::MAIN); | SelectParams(CBaseChainParams::MAIN); | ||||
noui_connect(); | noui_connect(); | ||||
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 unintentially | // platform ("xcb", "windows", or "cocoa") so tests can't unintentially | ||||
// 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); | #if defined(WIN32) | ||||
_putenv_s("QT_QPA_PLATFORM", "minimal"); | |||||
#else // Don't remove this, it's needed to access | |||||
setenv("QT_QPA_PLATFORM", "minimal", 0); // QApplication:: and QCoreApplication:: in the tests | |||||
#endif | |||||
// Don't remove this, it's needed to access | |||||
// QApplication:: and QCoreApplication:: in the tests | |||||
QApplication app(argc, argv); | QApplication app(argc, argv); | ||||
app.setApplicationName("BitcoinABC-Qt-test"); | app.setApplicationName("BitcoinABC-Qt-test"); | ||||
// This is necessary to initialize openssl on the test framework | // This is necessary to initialize openssl on the test framework | ||||
// (at least on Darwin). | // (at least on Darwin). | ||||
SSL_library_init(); | SSL_library_init(); | ||||
URITests test1; | URITests test1; | ||||
Show All 34 Lines |