summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-25 14:59:27 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-25 08:42:23 +0200
commitf6b05d50758ccc5a9aaf5cd37a710f80c9e1d413 (patch)
tree1bab23a129629fcd9398d6b54207ef8ecf65eb79 /tests
parent54318131a568dafcb0d84d89d2fcb2472c9e97f9 (diff)
Remove QSKIPs from qgraphicslinearlayout test
If the test decides not to do some extra testing for certain styles, but doesn't find any failures in what it has done so far, it should pass rather than skipping. Removing the QSKIPs also corrects the leakage of the memory pointed to by "widget". Change-Id: Ibd0f3f0605660c92e9bab2a3d1d9f31b52192575 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index 9769ff0da4..3c458b0ead 100644
--- a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -936,6 +936,7 @@ void tst_QGraphicsLinearLayout::setSpacing()
widget->setLayout(&layout);
layout.setContentsMargins(0, 0, 0, 0);
+ // The remainder of this test is only applicable if the style uses uniform spacing
qreal oldSpacing = layout.spacing();
if (oldSpacing != -1) {
for (int i = 0; i < 3; ++i)
@@ -951,8 +952,6 @@ void tst_QGraphicsLinearLayout::setSpacing()
QSizeF newSizeHint = layout.sizeHint(Qt::PreferredSize);
QCOMPARE(oldSizeHint.width() - oldSpacing * 2, newSizeHint.width() - spacing * 2);
- } else {
- QSKIP("This style uses non-uniform spacings (layoutSpacingImplementation() is reimplemented)");
}
delete widget;
}
@@ -995,10 +994,10 @@ void tst_QGraphicsLinearLayout::setItemSpacing()
view.show();
QApplication::processEvents();
QSizeF newSizeHint = layout->sizeHint(Qt::PreferredSize);
+
+ // The remainder of this test is only applicable if the style uses uniform spacing
if (oldSpacing >= 0) {
QCOMPARE(newSizeHint.width() - spacing, oldSizeHint.width() - oldSpacing);
- } else {
- QSKIP("This style uses non-uniform spacings (layoutSpacingImplementation() is reimplemented)");
}
delete widget;
}