From 0c7165b201ff5221b0e2b8dcea82dccfb82b5eff 2012-09-05 13:24:04 From: Michal Klocek Date: 2012-09-05 13:24:04 Subject: [PATCH] Removes test_private form qmake, adds chaeck in soruce file of private tests --- diff --git a/config.pri b/config.pri index b9e31ff..e7d4f6e 100644 --- a/config.pri +++ b/config.pri @@ -97,7 +97,6 @@ coverage: CONFIG += debug ##################### UNIT TESTS ############################################################## CONFIG(debug, debug|release) { - CONFIG+=test_private DEFINES+=BUILD_PRIVATE_UNIT_TESTS } diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index c444a4a..acbf172 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -22,13 +22,14 @@ SUBDIRS += \ qhorizontalpercentbarseries \ qvalueaxis \ qcategoryaxis \ - qbarcategoryaxis + qbarcategoryaxis \ + domain \ + chartdataset !linux-arm*: { SUBDIRS += \ qdatetimeaxis } -test_private:{ - SUBDIRS += domain chartdataset -} + + diff --git a/tests/auto/chartdataset/tst_chartdataset.cpp b/tests/auto/chartdataset/tst_chartdataset.cpp index 96aae05..c7229f6 100644 --- a/tests/auto/chartdataset/tst_chartdataset.cpp +++ b/tests/auto/chartdataset/tst_chartdataset.cpp @@ -17,6 +17,27 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +#ifndef BUILD_PRIVATE_UNIT_TESTS +#include + +class tst_ChartDataSet: public QObject { + + Q_OBJECT + +private Q_SLOTS: + void skip(); + +}; + +void tst_ChartDataSet::skip() +{ + QSKIP("This test requires the debug version of library", SkipAll); +} + +QTEST_MAIN(tst_ChartDataSet) +#include "tst_chartdataset.moc" + +#else #include #include @@ -620,4 +641,4 @@ void tst_ChartDataSet::scrollDomain() QTEST_MAIN(tst_ChartDataSet) #include "tst_chartdataset.moc" - +#endif diff --git a/tests/auto/domain/domain.pro b/tests/auto/domain/domain.pro index 267f83a..8c9af3d 100644 --- a/tests/auto/domain/domain.pro +++ b/tests/auto/domain/domain.pro @@ -1,4 +1,5 @@ !include( ../auto.pri ) { error( "Couldn't find the auto.pri file!" ) } + SOURCES += tst_domain.cpp diff --git a/tests/auto/domain/tst_domain.cpp b/tests/auto/domain/tst_domain.cpp index d14f2af..544f97b 100644 --- a/tests/auto/domain/tst_domain.cpp +++ b/tests/auto/domain/tst_domain.cpp @@ -17,6 +17,28 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +#ifndef BUILD_PRIVATE_UNIT_TESTS + +#include + +class tst_Domain: public QObject { + + Q_OBJECT + +private Q_SLOTS: + void skip(); + +}; + +void tst_Domain::skip() +{ + QSKIP("This test requires the debug version of library", SkipAll); +} + +QTEST_MAIN(tst_Domain) +#include "tst_domain.moc" + +#else #include #include @@ -678,4 +700,4 @@ void tst_Domain::move() QTEST_MAIN(tst_Domain) #include "tst_domain.moc" - +#endif