summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-11-04 16:11:58 -0300
committerEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-11-04 20:28:35 -0300
commit95ec02845997c2dee796c680186c46ab29e5e9ce (patch)
tree2d43f0803c2ccd5003fa1cdb4ac20888c9560a76 /tests
parent6c758ba18ded5ed1ac518777cb59e519142d292c (diff)
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 a7ce9be79f..57e5c41be9 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..