Browse Source

[Qt] copyright, style and indentation cleanup of Qt tests

0.10
Philip Kaufmann 10 years ago
parent
commit
1ffb99b07f
  1. 4
      src/qt/test/paymentrequestdata.h
  2. 9
      src/qt/test/paymentservertests.cpp
  3. 8
      src/qt/test/paymentservertests.h
  4. 7
      src/qt/test/test_main.cpp
  5. 4
      src/qt/test/uritests.cpp
  6. 4
      src/qt/test/uritests.h

4
src/qt/test/paymentrequestdata.h

@ -1,3 +1,7 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// //
// Data for paymentservertests.cpp // Data for paymentservertests.cpp
// //

9
src/qt/test/paymentservertests.cpp

@ -1,3 +1,7 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "paymentservertests.h" #include "paymentservertests.h"
#include "optionsmodel.h" #include "optionsmodel.h"
@ -21,7 +25,6 @@ X509 *parse_b64der_cert(const char* cert_data)
return cert; return cert;
} }
// //
// Test payment request handling // Test payment request handling
// //
@ -30,7 +33,7 @@ static SendCoinsRecipient handleRequest(PaymentServer* server, std::vector<unsig
{ {
RecipientCatcher sigCatcher; RecipientCatcher sigCatcher;
QObject::connect(server, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)), QObject::connect(server, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)),
&sigCatcher, SLOT(getRecipient(SendCoinsRecipient))); &sigCatcher, SLOT(getRecipient(SendCoinsRecipient)));
// Write data to a temp file: // Write data to a temp file:
QTemporaryFile f; QTemporaryFile f;
@ -48,7 +51,7 @@ static SendCoinsRecipient handleRequest(PaymentServer* server, std::vector<unsig
QCoreApplication::sendEvent(&object, &event); QCoreApplication::sendEvent(&object, &event);
QObject::disconnect(server, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)), QObject::disconnect(server, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)),
&sigCatcher, SLOT(getRecipient(SendCoinsRecipient))); &sigCatcher, SLOT(getRecipient(SendCoinsRecipient)));
// Return results from sigCatcher // Return results from sigCatcher
return sigCatcher.recipient; return sigCatcher.recipient;

8
src/qt/test/paymentservertests.h

@ -1,3 +1,7 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef PAYMENTSERVERTESTS_H #ifndef PAYMENTSERVERTESTS_H
#define PAYMENTSERVERTESTS_H #define PAYMENTSERVERTESTS_H
@ -15,8 +19,8 @@ private slots:
}; };
// Dummy class to receive paymentserver signals. // Dummy class to receive paymentserver signals.
// If SendCoinsRecipient was a proper QObject, then we could use // If SendCoinsRecipient was a proper QObject, then
// QSignalSpy... but it's not. // we could use QSignalSpy... but it's not.
class RecipientCatcher : public QObject class RecipientCatcher : public QObject
{ {
Q_OBJECT Q_OBJECT

7
src/qt/test/test_main.cpp

@ -1,11 +1,16 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// 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 "uritests.h"
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
#include "paymentservertests.h" #include "paymentservertests.h"
#endif #endif
#include "uritests.h"
#include <QCoreApplication> #include <QCoreApplication>
#include <QObject> #include <QObject>

4
src/qt/test/uritests.cpp

@ -1,3 +1,7 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "uritests.h" #include "uritests.h"
#include "guiutil.h" #include "guiutil.h"

4
src/qt/test/uritests.h

@ -1,3 +1,7 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef URITESTS_H #ifndef URITESTS_H
#define URITESTS_H #define URITESTS_H

Loading…
Cancel
Save