Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/addressbooktests.cpp
Show All 11 Lines | |||||
#include <qt/walletmodel.h> | #include <qt/walletmodel.h> | ||||
#include <cashaddrenc.h> | #include <cashaddrenc.h> | ||||
#include <key.h> | #include <key.h> | ||||
#include <key_io.h> | #include <key_io.h> | ||||
#include <pubkey.h> | #include <pubkey.h> | ||||
#include <wallet/wallet.h> | #include <wallet/wallet.h> | ||||
#include <QApplication> | |||||
#include <QMessageBox> | #include <QMessageBox> | ||||
#include <QTimer> | #include <QTimer> | ||||
namespace { | namespace { | ||||
/** | /** | ||||
* Fill the edit address dialog box with data, submit it, and ensure that | * Fill the edit address dialog box with data, submit it, and ensure that | ||||
* the resulting message meets expectations. | * the resulting message meets expectations. | ||||
▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | EditAddressAndSubmit(&editAddressDialog, QString("new"), new_address, | ||||
QString("")); | QString("")); | ||||
check_addbook_size(3); | check_addbook_size(3); | ||||
} | } | ||||
} // namespace | } // namespace | ||||
void AddressBookTests::addressBookTests() { | void AddressBookTests::addressBookTests() { | ||||
#ifdef Q_OS_MAC | |||||
if (QApplication::platformName() == "minimal") { | |||||
// Disable for mac on "minimal" platform to avoid crashes inside the Qt | |||||
// framework when it tries to look up unimplemented cocoa functions, | |||||
// and fails to handle returned nulls | |||||
// (https://bugreports.qt.io/browse/QTBUG-49686). | |||||
QWARN( | |||||
"Skipping AddressBookTests on mac build with 'minimal' platform " | |||||
"set due to Qt bugs. To run AppTests, invoke with 'test_bitcoin-qt " | |||||
"-platform cocoa' on mac, or else use a linux or windows build."); | |||||
return; | |||||
} | |||||
#endif | |||||
TestAddAddressesToSendBook(); | TestAddAddressesToSendBook(); | ||||
} | } |