summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@nokia.com>2012-09-04 12:40:16 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-14 06:24:38 +0200
commit34cd8fd566cd61385db12112d9515b0d5388dad3 (patch)
tree0f311e165c03c040f2c32261f96d80965443d4c6 /tests/auto/gui
parent6fd1895b918c45d8404ff38319f508f0357cba27 (diff)
tests: Don't omit the body of a test function with QT_BUILD_INTERNAL
Changing it outside of the test function definition to avoid running empty/inapplicable test functions. Change-Id: I713560cde7f715696984ed082d682900f5f1bcdd Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp6
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp6
-rw-r--r--tests/auto/gui/painting/qregion/tst_qregion.cpp8
3 files changed, 14 insertions, 6 deletions
diff --git a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp
index 1c661f9060..508792bb97 100644
--- a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp
+++ b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp
@@ -131,7 +131,9 @@ private slots:
void useCase3();
void rootItemFlags();
+#ifdef QT_BUILD_INTERNAL
void treeDragAndDrop();
+#endif
void removeRowsAndColumns();
void itemRoleNames();
@@ -1471,9 +1473,9 @@ struct FriendlyTreeView : public QTreeView
};
#endif
+#ifdef QT_BUILD_INTERNAL
void tst_QStandardItemModel::treeDragAndDrop()
{
-#ifdef QT_BUILD_INTERNAL
const int nRow = 5;
const int nCol = 3;
@@ -1611,8 +1613,8 @@ void tst_QStandardItemModel::treeDragAndDrop()
QVERIFY(compareModels(&model, &checkModel));
}
-#endif
}
+#endif
void tst_QStandardItemModel::removeRowsAndColumns()
{
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index 766352f918..e479e7da24 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -131,7 +131,9 @@ private slots:
void parseString();
void fromString_data();
void fromString();
+#ifdef QT_BUILD_INTERNAL
void ensureSorted();
+#endif
void standardKeys_data();
void standardKeys();
void keyBindings();
@@ -299,9 +301,9 @@ void tst_QKeySequence::checkMultipleCodes()
* We must ensure that the keyBindings data is always sorted
* so that we can safely perform binary searches.
*/
+#ifdef QT_BUILD_INTERNAL
void tst_QKeySequence::ensureSorted()
{
-#if defined(QT_BUILD_INTERNAL)
uint N = QKeySequencePrivate::numberOfKeyBindings;
uint val = QKeySequencePrivate::keyBindings[0].shortcut;
for ( uint i = 1 ; i < N ; ++i) {
@@ -311,8 +313,8 @@ void tst_QKeySequence::ensureSorted()
QVERIFY(nextval >= val);
val = nextval;
}
-#endif
}
+#endif
void tst_QKeySequence::standardKeys_data()
{
diff --git a/tests/auto/gui/painting/qregion/tst_qregion.cpp b/tests/auto/gui/painting/qregion/tst_qregion.cpp
index 863690fd78..a4fdf1d294 100644
--- a/tests/auto/gui/painting/qregion/tst_qregion.cpp
+++ b/tests/auto/gui/painting/qregion/tst_qregion.cpp
@@ -96,8 +96,10 @@ private slots:
void regionFromPath();
+#ifdef QT_BUILD_INTERNAL
void regionToPath_data();
void regionToPath();
+#endif
};
Q_DECLARE_METATYPE(QPolygon)
@@ -910,6 +912,7 @@ void tst_QRegion::regionFromPath()
Q_DECLARE_METATYPE(QPainterPath)
+#ifdef QT_BUILD_INTERNAL
void tst_QRegion::regionToPath_data()
{
QTest::addColumn<QPainterPath>("path");
@@ -957,6 +960,7 @@ void tst_QRegion::regionToPath_data()
QTest::newRow("Grid") << path;
}
}
+#endif
#ifdef QT_BUILD_INTERNAL
QT_BEGIN_NAMESPACE
@@ -964,9 +968,9 @@ extern QPainterPath qt_regionToPath(const QRegion &region);
QT_END_NAMESPACE
#endif
+#ifdef QT_BUILD_INTERNAL
void tst_QRegion::regionToPath()
{
-#ifdef QT_BUILD_INTERNAL
QFETCH(QPainterPath, path);
@@ -1001,8 +1005,8 @@ void tst_QRegion::regionToPath()
QCOMPARE(ia, ib);
QCOMPARE(a.boundingRect(), b.boundingRect());
}
-#endif
}
+#endif
QTEST_MAIN(tst_QRegion)
#include "tst_qregion.moc"