@@ -31,7 +31,11 private Q_SLOTS: | |||||
31 |
|
31 | |||
32 | void tst_ChartDataSet::skip() |
|
32 | void tst_ChartDataSet::skip() | |
33 | { |
|
33 | { | |
|
34 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |||
|
35 | QSKIP("This test requires the debug version of library"); | |||
|
36 | #else | |||
34 | QSKIP("This test requires the debug version of library", SkipAll); |
|
37 | QSKIP("This test requires the debug version of library", SkipAll); | |
|
38 | #endif | |||
35 | } |
|
39 | } | |
36 |
|
40 | |||
37 | QTEST_MAIN(tst_ChartDataSet) |
|
41 | QTEST_MAIN(tst_ChartDataSet) |
@@ -32,7 +32,11 private Q_SLOTS: | |||||
32 |
|
32 | |||
33 | void tst_Domain::skip() |
|
33 | void tst_Domain::skip() | |
34 | { |
|
34 | { | |
|
35 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |||
|
36 | QSKIP("This test requires the debug version of library"); | |||
|
37 | #else | |||
35 | QSKIP("This test requires the debug version of library", SkipAll); |
|
38 | QSKIP("This test requires the debug version of library", SkipAll); | |
|
39 | #endif | |||
36 | } |
|
40 | } | |
37 |
|
41 | |||
38 | QTEST_MAIN(tst_Domain) |
|
42 | QTEST_MAIN(tst_Domain) |
@@ -50,17 +50,32 namespace QTest | |||||
50 | // Some bamboo clients have trouble passing mouse events to the test application. |
|
50 | // Some bamboo clients have trouble passing mouse events to the test application. | |
51 | // This can be used to skip those tests so that they don't show up as a failure |
|
51 | // This can be used to skip those tests so that they don't show up as a failure | |
52 | // in the test report. |
|
52 | // in the test report. | |
53 | #define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \ |
|
53 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |
54 | do { \ |
|
54 | #define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \ | |
55 |
|
|
55 | do { \ | |
56 | b.resize(100, 100); \ |
|
56 | QPushButton b; \ | |
57 |
|
|
57 | b.resize(100, 100); \ | |
58 | QTest::qWaitForWindowShown(&b); \ |
|
58 | b.show(); \ | |
59 | QSignalSpy spy(&b, SIGNAL(clicked())); \ |
|
59 | QTest::qWaitForWindowShown(&b); \ | |
60 | QTest::mouseClick(&b, Qt::LeftButton, 0, b.rect().center()); \ |
|
60 | QSignalSpy spy(&b, SIGNAL(clicked())); \ | |
61 | if (spy.count() == 0) \ |
|
61 | QTest::mouseClick(&b, Qt::LeftButton, 0, b.rect().center()); \ | |
62 | QSKIP("Cannot test mouse events in this environment", SkipAll); \ |
|
62 | if (spy.count() == 0) \ | |
63 | } while (0); \ |
|
63 | QSKIP("Cannot test mouse events in this environment"); \ | |
64 | } |
|
64 | } while (0); \ | |
|
65 | } | |||
|
66 | #else | |||
|
67 | #define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \ | |||
|
68 | do { \ | |||
|
69 | QPushButton b; \ | |||
|
70 | b.resize(100, 100); \ | |||
|
71 | b.show(); \ | |||
|
72 | QTest::qWaitForWindowShown(&b); \ | |||
|
73 | QSignalSpy spy(&b, SIGNAL(clicked())); \ | |||
|
74 | QTest::mouseClick(&b, Qt::LeftButton, 0, b.rect().center()); \ | |||
|
75 | if (spy.count() == 0) \ | |||
|
76 | QSKIP("Cannot test mouse events in this environment", SkipAll); \ | |||
|
77 | } while (0); \ | |||
|
78 | } | |||
|
79 | #endif | |||
65 |
|
80 | |||
66 | #endif // TST_DEFINITIONS_H |
|
81 | #endif // TST_DEFINITIONS_H |
@@ -139,7 +139,11 void tst_QAbstractAxis::axisPenColor_data() | |||||
139 |
|
139 | |||
140 | void tst_QAbstractAxis::axisPenColor() |
|
140 | void tst_QAbstractAxis::axisPenColor() | |
141 | { |
|
141 | { | |
|
142 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |||
|
143 | QSKIP("Test is not implemented. This is deprecated function"); | |||
|
144 | #else | |||
142 | QSKIP("Test is not implemented. This is deprecated function", SkipAll); |
|
145 | QSKIP("Test is not implemented. This is deprecated function", SkipAll); | |
|
146 | #endif | |||
143 | } |
|
147 | } | |
144 |
|
148 | |||
145 | void tst_QAbstractAxis::gridLinePen_data() |
|
149 | void tst_QAbstractAxis::gridLinePen_data() | |
@@ -404,7 +408,11 void tst_QAbstractAxis::labelsColor_data() | |||||
404 |
|
408 | |||
405 | void tst_QAbstractAxis::labelsColor() |
|
409 | void tst_QAbstractAxis::labelsColor() | |
406 | { |
|
410 | { | |
|
411 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |||
|
412 | QSKIP("Test is not implemented. This is deprecated function"); | |||
|
413 | #else | |||
407 | QSKIP("Test is not implemented. This is deprecated function", SkipAll); |
|
414 | QSKIP("Test is not implemented. This is deprecated function", SkipAll); | |
|
415 | #endif | |||
408 | } |
|
416 | } | |
409 |
|
417 | |||
410 | void tst_QAbstractAxis::labelsFont_data() |
|
418 | void tst_QAbstractAxis::labelsFont_data() | |
@@ -629,7 +637,11 void tst_QAbstractAxis::shadesBorderColor_data() | |||||
629 |
|
637 | |||
630 | void tst_QAbstractAxis::shadesBorderColor() |
|
638 | void tst_QAbstractAxis::shadesBorderColor() | |
631 | { |
|
639 | { | |
|
640 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |||
|
641 | QSKIP("Test is not implemented. This is deprecated function"); | |||
|
642 | #else | |||
632 | QSKIP("Test is not implemented. This is deprecated function", SkipAll); |
|
643 | QSKIP("Test is not implemented. This is deprecated function", SkipAll); | |
|
644 | #endif | |||
633 | } |
|
645 | } | |
634 |
|
646 | |||
635 | void tst_QAbstractAxis::shadesBrush_data() |
|
647 | void tst_QAbstractAxis::shadesBrush_data() | |
@@ -679,7 +691,11 void tst_QAbstractAxis::shadesColor_data() | |||||
679 | // public QColor shadesColor() const |
|
691 | // public QColor shadesColor() const | |
680 | void tst_QAbstractAxis::shadesColor() |
|
692 | void tst_QAbstractAxis::shadesColor() | |
681 | { |
|
693 | { | |
|
694 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |||
|
695 | QSKIP("Test is not implemented. This is deprecated function"); | |||
|
696 | #else | |||
682 | QSKIP("Test is not implemented. This is deprecated function", SkipAll); |
|
697 | QSKIP("Test is not implemented. This is deprecated function", SkipAll); | |
|
698 | #endif | |||
683 | } |
|
699 | } | |
684 |
|
700 | |||
685 | void tst_QAbstractAxis::shadesPen_data() |
|
701 | void tst_QAbstractAxis::shadesPen_data() |
General Comments 0
You need to be logged in to leave comments.
Login now