Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/test_main.cpp
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
Lint: Code style violation: '/home/vermorel/bitcoin-abc/src/qt/test/test_main.cpp' has code style errors. | |||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#if defined(HAVE_CONFIG_H) | #if defined(HAVE_CONFIG_H) | ||||
#include "config/bitcoin-config.h" | #include "config/bitcoin-config.h" | ||||
#endif | #endif | ||||
#include "bitcoinaddressvalidatortests.h" | #include "bitcoinaddressvalidatortests.h" | ||||
▲ Show 20 Lines • Show All 46 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. | ||||
#if defined(WIN32) | |||||
_putenv_s("QT_QPA_PLATFORM", "minimal"); | |||||
#else | |||||
setenv("QT_QPA_PLATFORM", "minimal", 0); | setenv("QT_QPA_PLATFORM", "minimal", 0); | ||||
#endif | |||||
deadalnixUnsubmitted Not Done Inline ActionsI think it'd be better to add a definition of setenv somewhere in /compat for win32, that way most of the code do not need to ifdef. setenv is also used in the seeder, and, while it isn't enough to get it to work on windows, that'd be a set in the right direction. deadalnix: I think it'd be better to add a definition of `setenv` somewhere in `/compat` for win32, that… | |||||
// 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 | ||||
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). | ||||
Show All 37 Lines |
'/home/vermorel/bitcoin-abc/src/qt/test/test_main.cpp' has code style errors.