summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-11-04 19:11:58 (GMT)
committerEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-11-04 23:28:35 (GMT)
commit95ec02845997c2dee796c680186c46ab29e5e9ce (patch)
tree2d43f0803c2ccd5003fa1cdb4ac20888c9560a76 /tests
parent6c758ba18ded5ed1ac518777cb59e519142d292c (diff)
downloadQt-95ec02845997c2dee796c680186c46ab29e5e9ce.zip
Qt-95ec02845997c2dee796c680186c46ab29e5e9ce.tar.gz
Qt-95ec02845997c2dee796c680186c46ab29e5e9ce.tar.bz2
QGAL (test): Test parent widget size besides children sizes
Sometimes a test fails due to a wrong child size and we spend a lot of time trying to understand why but, in fact the problem is in the parent size. This commit adds a test to check whether the parent widget was properly resized. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
index a7ce9be..57e5c41 100644
--- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
+++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
@@ -1720,10 +1720,8 @@ void tst_QGraphicsAnchorLayout1::testBasicLayout()
widget->setLayout(layout);
widget->setContentsMargins(0,0,0,0);
- widget->setMinimumSize(size);
- widget->setMaximumSize(size);
-
-// QTest::qWait(500); // layouting is asynchronous..
+ widget->resize(size);
+ QCOMPARE(widget->size(), size);
// Validate
for (int i = 0; i < result.count(); ++i) {
@@ -2231,8 +2229,8 @@ void tst_QGraphicsAnchorLayout1::testRemoveCenterAnchor()
widget->setLayout(layout);
widget->setContentsMargins(0,0,0,0);
- widget->setMinimumSize(size);
- widget->setMaximumSize(size);
+ widget->resize(size);
+ QCOMPARE(widget->size(), size);
// Validate
for (int i = 0; i < result.count(); ++i) {
@@ -3072,8 +3070,8 @@ void tst_QGraphicsAnchorLayout1::testComplexCases()
widget->setLayout(layout);
widget->setContentsMargins(0,0,0,0);
- widget->setMinimumSize(size);
- widget->setMaximumSize(size);
+ widget->resize(size);
+ QCOMPARE(widget->size(), size);
// QTest::qWait(500); // layouting is asynchronous..