summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Bugge Monsen <mmonsen@trolltech.com>2009-06-05 11:29:16 +0200
committerMarius Bugge Monsen <mmonsen@trolltech.com>2009-06-05 11:29:16 +0200
commit88c2cd7146e2857706ac0a4317a431cc52cecc3f (patch)
treeddef662f3f4b52ed45858f49a543c0de33bb2d0d
parentc8c483e96b7bb0ebe248bd8ed2f9ba306b80635c (diff)
Add some more test data to tst_QtGraphicsTreeView::layout().
-rw-r--r--tests/qgraphicstreeview/tst_qgraphicstreeview.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/qgraphicstreeview/tst_qgraphicstreeview.cpp b/tests/qgraphicstreeview/tst_qgraphicstreeview.cpp
index 13e9080..29ae25f 100644
--- a/tests/qgraphicstreeview/tst_qgraphicstreeview.cpp
+++ b/tests/qgraphicstreeview/tst_qgraphicstreeview.cpp
@@ -132,6 +132,54 @@ void tst_QtGraphicsTreeView::layout_data()
<< 0
<< 0. << 0.
<< QList<QRectF>();
+
+ QTest::newRow("five items, no depth")
+ << 5 << 1
+ << QSizeF(100, 100)
+ << 0
+ << 0. << 0.
+ << (QList<QRectF>()
+ << QRectF(0, 0, 20, 20)
+ << QRectF(0, 20, 20, 20)
+ << QRectF(0, 40, 20, 20)
+ << QRectF(0, 60, 20, 20)
+ << QRectF(0, 80, 20, 20));
+
+ QTest::newRow("five items, depth of 2")
+ << 5 << 2
+ << QSizeF(100, 100)
+ << 0
+ << 0. << 0.
+ << (QList<QRectF>()
+ << QRectF(0, 0, 20, 20)
+ << QRectF(0, 20, 20, 20)
+ << QRectF(0, 40, 20, 20)
+ << QRectF(0, 60, 20, 20)
+ << QRectF(0, 80, 20, 20));
+
+ QTest::newRow("ten items, no depth")
+ << 10 << 1
+ << QSizeF(100, 100)
+ << 0
+ << 0. << 0.
+ << (QList<QRectF>()
+ << QRectF(0, 0, 20, 20)
+ << QRectF(0, 20, 20, 20)
+ << QRectF(0, 40, 20, 20)
+ << QRectF(0, 60, 20, 20)
+ << QRectF(0, 80, 20, 20));
+
+ QTest::newRow("ten items, depth of 2")
+ << 10 << 2
+ << QSizeF(100, 100)
+ << 0
+ << 0. << 0.
+ << (QList<QRectF>()
+ << QRectF(0, 0, 20, 20)
+ << QRectF(0, 20, 20, 20)
+ << QRectF(0, 40, 20, 20)
+ << QRectF(0, 60, 20, 20)
+ << QRectF(0, 80, 20, 20));
}
void tst_QtGraphicsTreeView::layout()