Skip to content

Commit

Permalink
Tests: Do not depend on transitive includes
Browse files Browse the repository at this point in the history
Change-Id: Ibc6a948480a904913a5427e6408d4d296784fb4f
Reviewed-by: Sona Kurazyan <[email protected]>
  • Loading branch information
Inkane committed Mar 17, 2022
1 parent 468e9c1 commit 819e1bf
Show file tree
Hide file tree
Showing 37 changed files with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <QCoreApplication>
#include <QList>
#include <QTest>
#include <QSet>

#include "../testhelper_functions.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
**
****************************************************************************/
#include <QThread>
#include <QSet>

struct TestIterator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <QThread>
#include <QMutex>
#include <QTest>
#include <QSet>
#include <QRandomGenerator>

#include "../testhelper_functions.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <QThread>
#include <QElapsedTimer>
#include <QTest>
#include <QSet>

using namespace QtConcurrent;

Expand Down
2 changes: 2 additions & 0 deletions tests/auto/corelib/global/qlogging/tst_qlogging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
# include <QtCore/QProcess>
#endif
#include <QtTest/QTest>
#include <QList>
#include <QMap>

class tst_qmessagehandler : public QObject
{
Expand Down
2 changes: 2 additions & 0 deletions tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include <qdiriterator.h>
#include <qfileinfo.h>
#include <qstringlist.h>
#include <QSet>
#include <QString>

#include <QtCore/private/qfsfileengine_p.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include <QFileSystemWatcher>
#include <QElapsedTimer>
#include <QTextStream>
#include <QMap>
#include <QString>
#include <QDir>
#include <QSignalSpy>
#include <QTimer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <QTest>
#include <QMutexLocker>
#include <QLoggingCategory>
#include <QMap>
#include <QStringList>

Q_LOGGING_CATEGORY(TST_LOG, "tst.log")
Q_LOGGING_CATEGORY(Digia_Oslo_Office_com, "Digia.Oslo.Office.com")
Expand Down
2 changes: 2 additions & 0 deletions tests/auto/corelib/io/qurluts46/tst_qurluts46.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <QtCore/QUrl>
#include <QtCore/QFile>
#include <QTest>
#include <QSet>
#include <QByteArray>
#include <algorithm>

class tst_QUrlUts46 : public QObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <QtTest/qtest.h>
#include <QtCore/qcontainerinfo.h>
#include <QtCore/qmetacontainer.h>
#include <QtCore/QMap>
#include <QtCore/QHash>

#include <QtCore/qvector.h>
#include <QtCore/qset.h>
Expand Down
2 changes: 2 additions & 0 deletions tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

#include <qobject.h>
#include <qmetaobject.h>
#include <QMap>
#include <QString>

struct CustomType
{
Expand Down
2 changes: 2 additions & 0 deletions tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@
#include <QTest>
#include <QQueue>
#include <QStack>
#include <QSet>

#include <qvariant.h>
#include <QtCore/private/qvariant_p.h>
#include <qbitarray.h>
#include <qbytearraylist.h>
#include <qdatetime.h>
#include <qmap.h>
#include <QHash>
#include <qiodevice.h>
#include <qurl.h>
#include <qlocale.h>
Expand Down
1 change: 1 addition & 0 deletions tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include <qmimetype.h>
#include <qmimedatabase.h>
#include <QVariantMap>

#include <QTest>

Expand Down
2 changes: 2 additions & 0 deletions tests/auto/corelib/serialization/json/tst_qtjson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
****************************************************************************/

#include <QTest>
#include <QMap>
#include <QVariantList>

QT_WARNING_DISABLE_DEPRECATED

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
#include <QJsonValue>
#include <QJsonObject>
#include <QJsonArray>
#include <QVariant>
#include <QVariantMap>
#include <QVariantList>

Q_DECLARE_METATYPE(QCborValue)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// for negative testing (can't convert from)
#include <deque>
#include <list>
#include <QVarLengthArray>

template <typename T>
constexpr bool CanConvert = std::is_convertible_v<T, QByteArrayView>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <QStringTokenizer>
#include <QStringView>
#include <QTest>
#include <QVarLengthArray>

#include "../../../../shared/localechange.h"

Expand Down
3 changes: 3 additions & 0 deletions tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
#include <QTestEventLoop>
#include <QTimer>
#include <QSignalSpy>
#include <QVarLengthArray>
#include <QSet>
#include <QList>

#include <QTest>
#include <qfuture.h>
Expand Down
1 change: 1 addition & 0 deletions tests/auto/corelib/time/qdate/tst_qdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <QTimeZone>
#include <qdatetime.h>
#include <qlocale.h>
#include <QMap>

class tst_QDate : public QObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include "qbytearray.h"
#include "qdebug.h"
#include "qhash.h"
#include "qmap.h"
#include "qset.h"
#include "qlist.h"
#include "qstring.h"
#include "qvarlengtharray.h"
Expand Down
1 change: 1 addition & 0 deletions tests/auto/corelib/tools/qarraydata/simplevector.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include <QtCore/qarraydata.h>
#include <QtCore/qarraydatapointer.h>
#include <QtCore/qvarlengtharray.h>

#include <algorithm>

Expand Down
1 change: 1 addition & 0 deletions tests/auto/corelib/tools/qhash/tst_qhash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include <qhash.h>
#include <qmap.h>
#include <qset.h>

#include <algorithm>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
****************************************************************************/

#include <QTest>
#include <QVarLengthArray>

#include <qhash.h>

Expand Down
1 change: 1 addition & 0 deletions tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <QTest>
#include <QBuffer>
#include <QVarLengthArray>

#include <private/qringbuffer_p.h>
#include <qlist.h>
Expand Down
1 change: 1 addition & 0 deletions tests/auto/gui/image/qimage/tst_qimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <qimage.h>
#include <qimagereader.h>
#include <qlist.h>
#include <qset.h>
#include <qtransform.h>
#include <qrandom.h>
#include <stdio.h>
Expand Down
2 changes: 2 additions & 0 deletions tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include <QtWidgets/QGraphicsWidget>
#include <QtWidgets/QWidget>
#include <QTest>
#include <QSet>
#include <QVarLengthArray>
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qwindowsysteminterface_p.h>
#include <private/qevent_p.h>
Expand Down
1 change: 1 addition & 0 deletions tests/auto/gui/qvulkan/tst_qvulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <QtGui/QVulkanInstance>
#include <QtGui/QVulkanFunctions>
#include <QtGui/QVulkanWindow>
#include <QtCore/qvarlengtharray.h>

#include <QTest>

Expand Down
1 change: 1 addition & 0 deletions tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
****************************************************************************/

#include <QTest>
#include <QtCore/QSet>
#include <QtGui/QGuiApplication>
#include <QtGui/QPainter>
#include <QtGui/QImage>
Expand Down
2 changes: 2 additions & 0 deletions tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include <QScopeGuard>
#include <QBuffer>

#include <QtCore/qlist.h>
#include <QtCore/qset.h>
#include <QtCore/QCryptographicHash>
#include <QtCore/QDataStream>
#include <QtCore/QUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include <QTest>
#include <QtEndian>
#include <QSet>

#include <qcoreapplication.h>
#include <qnetworkinterface.h>
Expand Down
2 changes: 2 additions & 0 deletions tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
#include <qnetworkinterface.h>

#include <QNetworkProxy>
#include <QSet>
#include <QList>

#include "../../../network-settings.h"

Expand Down
1 change: 1 addition & 0 deletions tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include <QNetworkInterface>

#include <qstringlist.h>
#include <QSet>
#include "../../../network-settings.h"
#include <QtTest/private/qemulationdetector_p.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <QTest>

#include <QtNetwork/qtnetworkglobal.h>
#include <QtCore/qset.h>

#include <qsslcertificate.h>
#include <qsslkey.h>
Expand Down
1 change: 1 addition & 0 deletions tests/auto/network/ssl/shared/qopenssl_symbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
// reduced to the needs of our auto-tests, that have to mess with
// OpenSSL calls directly.

#include <QtCore/qset.h>
#include <QtNetwork/private/qtnetworkglobal_p.h>

QT_REQUIRE_CONFIG(openssl);
Expand Down
1 change: 1 addition & 0 deletions tests/auto/other/gestures/tst_gestures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <QtTest/qtesttouch.h>

#include <qevent.h>
#include <QSet>
#include <qpointingdevice.h>
#include <qwidget.h>
#include <qlayout.h>
Expand Down
1 change: 1 addition & 0 deletions tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <QMessageBox>
#include <QDebug>
#include <QPair>
#include <QSet>
#include <QList>
#include <QPointer>
#include <QTimer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
**
****************************************************************************/
#include <QString>
#include <QMap>
#include <QHash>

#include <qtest.h>

Expand Down

0 comments on commit 819e1bf

Please sign in to comment.