summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsanchorlayout
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-09-15 10:08:25 +0200
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-09-15 10:17:57 +0200
commit62fe4f11e49025156f9f5de2ffcbb9ad65198bc4 (patch)
treeb1459fe151bf15e7580cf7cca15214bbe7034c8c /tests/auto/qgraphicsanchorlayout
parent77e2b9a479f16581a8eee0ea13b23ac92ac4ee70 (diff)
Test if the direction influences the returned graphics anchor object.
Pointed out by Caio.
Diffstat (limited to 'tests/auto/qgraphicsanchorlayout')
-rw-r--r--tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index 059ad335ff..5bb3746a29 100644
--- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -1079,9 +1079,15 @@ void tst_QGraphicsAnchorLayout::delete_anchor()
QVERIFY(anchor1);
QGraphicsAnchor *anchor2 = l->anchor(w3, Qt::AnchorRight, l, Qt::AnchorRight);
QVERIFY(anchor2);
+ QGraphicsAnchor *anchor3 = l->anchor(l, Qt::AnchorRight, w3, Qt::AnchorRight);
+ QVERIFY(anchor3);
+ QGraphicsAnchor *anchor4 = l->anchor(l, Qt::AnchorRight, w3, Qt::AnchorRight);
+ QVERIFY(anchor4);
- // should be the same object
+ // should all be the same object
QCOMPARE(anchor1, anchor2);
+ QCOMPARE(anchor2, anchor3);
+ QCOMPARE(anchor3, anchor4);
// check if removal works
delete anchor1;