summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativepositioners
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-10-04 06:44:32 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-10-04 06:48:29 (GMT)
commitf25391e52af3eef68abfa3941fc48da0c52bb010 (patch)
tree0b8f02830dc0b81b144867c33253823ecc60ca2f /tests/auto/declarative/qdeclarativepositioners
parentda45259dbfa05c4f3b6c8c0472a65851692060e4 (diff)
downloadQt-f25391e52af3eef68abfa3941fc48da0c52bb010.zip
Qt-f25391e52af3eef68abfa3941fc48da0c52bb010.tar.gz
Qt-f25391e52af3eef68abfa3941fc48da0c52bb010.tar.bz2
Improve test coverage for declarative module.
Add additional autotests, and remove unreachable functions.
Diffstat (limited to 'tests/auto/declarative/qdeclarativepositioners')
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
index 57a8354..254349f 100644
--- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
+++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
@@ -322,7 +322,8 @@ void tst_QDeclarativePositioners::test_grid()
QCOMPARE(five->x(), 50.0);
QCOMPARE(five->y(), 50.0);
- QDeclarativeItem *grid = canvas->rootObject()->findChild<QDeclarativeItem*>("grid");
+ QDeclarativeGrid *grid = canvas->rootObject()->findChild<QDeclarativeGrid*>("grid");
+ QCOMPARE(grid->flow(), QDeclarativeGrid::LeftToRight);
QCOMPARE(grid->width(), 120.0);
QCOMPARE(grid->height(), 100.0);
@@ -355,7 +356,8 @@ void tst_QDeclarativePositioners::test_grid_topToBottom()
QCOMPARE(five->x(), 50.0);
QCOMPARE(five->y(), 50.0);
- QDeclarativeItem *grid = canvas->rootObject()->findChild<QDeclarativeItem*>("grid");
+ QDeclarativeGrid *grid = canvas->rootObject()->findChild<QDeclarativeGrid*>("grid");
+ QCOMPARE(grid->flow(), QDeclarativeGrid::TopToBottom);
QCOMPARE(grid->width(), 100.0);
QCOMPARE(grid->height(), 120.0);
@@ -670,10 +672,12 @@ void tst_QDeclarativePositioners::test_flow_implicit_resize()
QCOMPARE(flow->height(), 120.0);
canvas->rootObject()->setProperty("leftToRight", true);
+ QCOMPARE(flow->flow(), QDeclarativeFlow::LeftToRight);
QCOMPARE(flow->width(), 220.0);
QCOMPARE(flow->height(), 50.0);
canvas->rootObject()->setProperty("leftToRight", false);
+ QCOMPARE(flow->flow(), QDeclarativeFlow::TopToBottom);
QCOMPARE(flow->width(), 100.0);
QCOMPARE(flow->height(), 120.0);