diff --git a/tests/auto/chartdataset/tst_chartdataset.cpp b/tests/auto/chartdataset/tst_chartdataset.cpp index 2f86d00..f19be8d 100644 --- a/tests/auto/chartdataset/tst_chartdataset.cpp +++ b/tests/auto/chartdataset/tst_chartdataset.cpp @@ -31,7 +31,11 @@ private Q_SLOTS: void tst_ChartDataSet::skip() { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) + QSKIP("This test requires the debug version of library"); +#else QSKIP("This test requires the debug version of library", SkipAll); +#endif } QTEST_MAIN(tst_ChartDataSet) diff --git a/tests/auto/domain/tst_domain.cpp b/tests/auto/domain/tst_domain.cpp index b7b3623..e028bfa 100644 --- a/tests/auto/domain/tst_domain.cpp +++ b/tests/auto/domain/tst_domain.cpp @@ -32,7 +32,11 @@ private Q_SLOTS: void tst_Domain::skip() { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) + QSKIP("This test requires the debug version of library"); +#else QSKIP("This test requires the debug version of library", SkipAll); +#endif } QTEST_MAIN(tst_Domain) diff --git a/tests/auto/inc/tst_definitions.h b/tests/auto/inc/tst_definitions.h index 1642256..5c113c8 100644 --- a/tests/auto/inc/tst_definitions.h +++ b/tests/auto/inc/tst_definitions.h @@ -50,17 +50,32 @@ namespace QTest // Some bamboo clients have trouble passing mouse events to the test application. // This can be used to skip those tests so that they don't show up as a failure // in the test report. -#define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \ - do { \ - QPushButton b; \ - b.resize(100, 100); \ - b.show(); \ - QTest::qWaitForWindowShown(&b); \ - QSignalSpy spy(&b, SIGNAL(clicked())); \ - QTest::mouseClick(&b, Qt::LeftButton, 0, b.rect().center()); \ - if (spy.count() == 0) \ - QSKIP("Cannot test mouse events in this environment", SkipAll); \ - } while (0); \ -} +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) + #define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \ + do { \ + QPushButton b; \ + b.resize(100, 100); \ + b.show(); \ + QTest::qWaitForWindowShown(&b); \ + QSignalSpy spy(&b, SIGNAL(clicked())); \ + QTest::mouseClick(&b, Qt::LeftButton, 0, b.rect().center()); \ + if (spy.count() == 0) \ + QSKIP("Cannot test mouse events in this environment"); \ + } while (0); \ + } +#else + #define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \ + do { \ + QPushButton b; \ + b.resize(100, 100); \ + b.show(); \ + QTest::qWaitForWindowShown(&b); \ + QSignalSpy spy(&b, SIGNAL(clicked())); \ + QTest::mouseClick(&b, Qt::LeftButton, 0, b.rect().center()); \ + if (spy.count() == 0) \ + QSKIP("Cannot test mouse events in this environment", SkipAll); \ + } while (0); \ + } +#endif #endif // TST_DEFINITIONS_H diff --git a/tests/auto/qabstractaxis/tst_qabstractaxis.cpp b/tests/auto/qabstractaxis/tst_qabstractaxis.cpp index 6807ed4..8fbcd15 100644 --- a/tests/auto/qabstractaxis/tst_qabstractaxis.cpp +++ b/tests/auto/qabstractaxis/tst_qabstractaxis.cpp @@ -139,7 +139,11 @@ void tst_QAbstractAxis::axisPenColor_data() void tst_QAbstractAxis::axisPenColor() { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) + QSKIP("Test is not implemented. This is deprecated function"); +#else QSKIP("Test is not implemented. This is deprecated function", SkipAll); +#endif } void tst_QAbstractAxis::gridLinePen_data() @@ -404,7 +408,11 @@ void tst_QAbstractAxis::labelsColor_data() void tst_QAbstractAxis::labelsColor() { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) + QSKIP("Test is not implemented. This is deprecated function"); +#else QSKIP("Test is not implemented. This is deprecated function", SkipAll); +#endif } void tst_QAbstractAxis::labelsFont_data() @@ -629,7 +637,11 @@ void tst_QAbstractAxis::shadesBorderColor_data() void tst_QAbstractAxis::shadesBorderColor() { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) + QSKIP("Test is not implemented. This is deprecated function"); +#else QSKIP("Test is not implemented. This is deprecated function", SkipAll); +#endif } void tst_QAbstractAxis::shadesBrush_data() @@ -679,7 +691,11 @@ void tst_QAbstractAxis::shadesColor_data() // public QColor shadesColor() const void tst_QAbstractAxis::shadesColor() { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) + QSKIP("Test is not implemented. This is deprecated function"); +#else QSKIP("Test is not implemented. This is deprecated function", SkipAll); +#endif } void tst_QAbstractAxis::shadesPen_data()