summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsanchorlayout
diff options
context:
space:
mode:
authorEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-09-24 11:16:16 -0300
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-10-06 11:28:31 +0200
commite210bea72ef65f99babb4c6f5bd442184c671d3b (patch)
treed0c8ca8e33b11d869c0088dee238df96ca7ff0bd /tests/auto/qgraphicsanchorlayout
parent1728f846d9fb53a699782005d6478c0f23f9b82e (diff)
QGraphicsAnchorLayout Tests: Enable expanding tests
Removing QEXPECT_FAIL and making minor corrections on expected values. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
Diffstat (limited to 'tests/auto/qgraphicsanchorlayout')
-rw-r--r--tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index e898edb17b..4ad48c7f55 100644
--- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -1359,7 +1359,6 @@ void tst_QGraphicsAnchorLayout::expandingSequence()
QSizeF layoutExpandedSize(pref.width() + max.width(), layoutMinimumSize.height());
p.resize(layoutExpandedSize);
- QEXPECT_FAIL("", "Support for QSizePolicy::ExpandFlag not yet available", Abort);
QCOMPARE(a->geometry().size(), pref);
QCOMPARE(b->geometry().size(), max);
@@ -1409,7 +1408,6 @@ void tst_QGraphicsAnchorLayout::expandingSequenceFairDistribution()
layoutMinimumSize.height());
p.resize(layoutPartialExpandedSize);
- QEXPECT_FAIL("", "Support for QSizePolicy::ExpandFlag not yet available", Abort);
QCOMPARE(a->geometry().size(), pref);
QCOMPARE(b->geometry().size(), pref + QSizeF(10, 0));
QCOMPARE(c->geometry().size(), pref);
@@ -1443,6 +1441,7 @@ void tst_QGraphicsAnchorLayout::expandingSequenceFairDistribution()
QSizeF newLayoutPartialExpandedSize((4 * pref.width()) + 75,
layoutMinimumSize.height());
+ p.resize(newLayoutPartialExpandedSize);
QCOMPARE(a->geometry().size(), pref);
QCOMPARE(b->geometry().size(), pref + QSizeF(25, 0));
@@ -1454,11 +1453,12 @@ void tst_QGraphicsAnchorLayout::expandingParallel()
{
QSizeF min(10, 10);
QSizeF pref(50, 10);
- QSizeF max(100, 50);
+ QSizeF max(100, 10);
+ QSizeF max2(100, 50);
QGraphicsWidget *a = createItem(min, pref, max, "a");
QGraphicsWidget *b = createItem(min, pref, max, "b");
- QGraphicsWidget *c = createItem(min, pref, max, "c");
+ QGraphicsWidget *c = createItem(min, pref, max2, "c");
b->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
@@ -1492,10 +1492,9 @@ void tst_QGraphicsAnchorLayout::expandingParallel()
QSizeF layoutExpandedSize(pref.width() + max.width(), layoutMinimumSize.height());
p.resize(layoutExpandedSize);
- QEXPECT_FAIL("", "Support for QSizePolicy::ExpandFlag not yet available", Abort);
QCOMPARE(a->geometry().size(), max);
QCOMPARE(b->geometry().size(), max);
- QCOMPARE(c->geometry().size(), pref);
+ QCOMPARE(c->geometry().size(), QSizeF(pref.width(), 20));
QSizeF layoutMaximumSize = l->effectiveSizeHint(Qt::MaximumSize);
QCOMPARE(layoutMaximumSize.width(), qreal(200));
@@ -1511,12 +1510,12 @@ void tst_QGraphicsAnchorLayout::expandingParallel()
QSizeF newLayoutMinimumSize = l->effectiveSizeHint(Qt::MinimumSize);
QCOMPARE(newLayoutMinimumSize.width(), qreal(30));
- QSizeF newLayoutExpandedSize(pref.width() + max.width(), layoutMinimumSize.height());
+ QSizeF newLayoutExpandedSize = layoutExpandedSize + QSizeF(100, 0);
p.resize(newLayoutExpandedSize);
- QCOMPARE(a->geometry().size(), max);
+ QCOMPARE(a->geometry().size(), max + QSizeF(100, 0));
QCOMPARE(b->geometry().size(), max);
- QCOMPARE(c->geometry().size(), pref);
+ QCOMPARE(c->geometry().size(), QSizeF(pref.width(), 20));
QSizeF newLayoutMaximumSize = l->effectiveSizeHint(Qt::MaximumSize);
QCOMPARE(newLayoutMaximumSize.width(), qreal(300));