diff options
Diffstat (limited to 'tests/auto/qgraphicssceneindex')
-rw-r--r-- | tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp index 209e4be..f2a2bf1 100644 --- a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp +++ b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp @@ -44,7 +44,6 @@ #include <QtGui/qgraphicssceneindex.h> #include <private/qgraphicsscene_bsp_p.h> -#include <QtGui> //TESTED_CLASS= //TESTED_FILES= @@ -56,13 +55,40 @@ public slots: void initTestCase(); private slots: + void sceneRect_data(); void sceneRect(); + +private: + void common_data(); + QGraphicsSceneIndex *createIndex(const QString &name); }; void tst_QGraphicsSceneIndex::initTestCase() { } +void tst_QGraphicsSceneIndex::common_data() +{ + QTest::addColumn<QString>("indexMethod"); + + QTest::newRow("BSP") << QString("bsp"); +} + +QGraphicsSceneIndex *tst_QGraphicsSceneIndex::createIndex(const QString &indexMethod) +{ + QGraphicsSceneIndex *index = 0; + + if (indexMethod == "bsp") + index = new QGraphicsSceneBspTree; + + return index; +} + +void tst_QGraphicsSceneIndex::sceneRect_data() +{ + common_data(); +} + void tst_QGraphicsSceneIndex::sceneRect() { QGraphicsSceneIndex *index = new QGraphicsSceneBspTree; |