diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-14 16:23:27 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-14 15:16:22 +0000 |
commit | fd94d8e5673a5d5228aa2d38b605fde7a881332b (patch) | |
tree | c29af3482d539c30d0dec55e0f52189137f620c7 /tests | |
parent | 596c407a3c5719d5369c602b51cbd3b31779b9da (diff) |
Conditionally enable subprojects for the private class tests
Instead of using #ifdefs for the private class tests, conditionally
enable/disable subprojects for them.
Change-Id: I574dc34dd895a4fc2eeb311dfb91a149a6715e28
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/auto.pro | 13 | ||||
-rw-r--r-- | tests/auto/qcoapinternalreply/tst_qcoapinternalreply.cpp | 17 | ||||
-rw-r--r-- | tests/auto/qcoapinternalrequest/tst_qcoapinternalrequest.cpp | 17 | ||||
-rw-r--r-- | tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp | 17 | ||||
-rw-r--r-- | tests/auto/qcoapreply/tst_qcoapreply.cpp | 17 |
5 files changed, 8 insertions, 73 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 82c8af8..5bfc66e 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -1,14 +1,17 @@ TEMPLATE = subdirs +# TODO: enable disabled tests, when CI is configured properly + SUBDIRS += \ cmake \ -# TODO: enable the tests below, when CI is configured properly # qcoapclient \ -# qcoapqudpconnection \ - qcoapinternalreply \ - qcoapinternalrequest \ qcoapmessage \ qcoapoption \ - qcoapreply \ qcoaprequest \ qcoapresource + +qtConfig(private_tests): SUBDIRS += \ +# qcoapqudpconnection \ + qcoapinternalrequest \ + qcoapinternalreply \ + qcoapreply diff --git a/tests/auto/qcoapinternalreply/tst_qcoapinternalreply.cpp b/tests/auto/qcoapinternalreply/tst_qcoapinternalreply.cpp index f9f46bd..c12592a 100644 --- a/tests/auto/qcoapinternalreply/tst_qcoapinternalreply.cpp +++ b/tests/auto/qcoapinternalreply/tst_qcoapinternalreply.cpp @@ -34,8 +34,6 @@ #include <private/qcoapinternalreply_p.h> #include <private/qcoapreply_p.h> -#ifdef QT_BUILD_INTERNAL - class tst_QCoapInternalReply : public QObject { Q_OBJECT @@ -191,21 +189,6 @@ void tst_QCoapInternalReply::updateReply() QCOMPARE(reply->readAll(), data); } -#else - -class tst_QCoapInternalReply : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase() - { - QSKIP("Not an internal build, nothing to test"); - } -}; - -#endif - QTEST_MAIN(tst_QCoapInternalReply) #include "tst_qcoapinternalreply.moc" diff --git a/tests/auto/qcoapinternalrequest/tst_qcoapinternalrequest.cpp b/tests/auto/qcoapinternalrequest/tst_qcoapinternalrequest.cpp index d3e367b..d14edc1 100644 --- a/tests/auto/qcoapinternalrequest/tst_qcoapinternalrequest.cpp +++ b/tests/auto/qcoapinternalrequest/tst_qcoapinternalrequest.cpp @@ -35,8 +35,6 @@ #include <private/qcoapinternalrequest_p.h> #include <private/qcoaprequest_p.h> -#ifdef QT_BUILD_INTERNAL - class tst_QCoapInternalRequest : public QObject { Q_OBJECT @@ -315,21 +313,6 @@ void tst_QCoapInternalRequest::isMulticast() QCOMPARE(internalRequest.isMulticast(), result); } -#else - -class tst_QCoapInternalRequest : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase() - { - QSKIP("Not an internal build, nothing to test"); - } -}; - -#endif - QTEST_APPLESS_MAIN(tst_QCoapInternalRequest) #include "tst_qcoapinternalrequest.moc" diff --git a/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp b/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp index ee8c295..8876214 100644 --- a/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp +++ b/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp @@ -43,8 +43,6 @@ #include <private/qcoaprequest_p.h> #include "../coapnetworksettings.h" -#ifdef QT_BUILD_INTERNAL - using namespace QtCoapNetworkSettings; class tst_QCoapQUdpConnection : public QObject @@ -197,21 +195,6 @@ void tst_QCoapQUdpConnection::sendRequest() QVERIFY(QString(data.toHex()).endsWith(dataHexaPayload)); } -#else - -class tst_QCoapQUdpConnection : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase() - { - QSKIP("Not an internal build, nothing to test"); - } -}; - -#endif - QTEST_MAIN(tst_QCoapQUdpConnection) #include "tst_qcoapqudpconnection.moc" diff --git a/tests/auto/qcoapreply/tst_qcoapreply.cpp b/tests/auto/qcoapreply/tst_qcoapreply.cpp index f893840..c02c3ae 100644 --- a/tests/auto/qcoapreply/tst_qcoapreply.cpp +++ b/tests/auto/qcoapreply/tst_qcoapreply.cpp @@ -35,8 +35,6 @@ #include <private/qcoapreply_p.h> #include <private/qcoapnamespace_p.h> -#ifdef QT_BUILD_INTERNAL - class tst_QCoapReply : public QObject { Q_OBJECT @@ -145,21 +143,6 @@ void tst_QCoapReply::abortRequest() QVERIFY(arguments.at(0).toByteArray() == "token"); } -#else - -class tst_QCoapReply : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase() - { - QSKIP("Not an internal build, nothing to test"); - } -}; - -#endif - QTEST_MAIN(tst_QCoapReply) #include "tst_qcoapreply.moc" |