summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-09-15 08:08:25 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-09-15 08:17:57 (GMT)
commit62fe4f11e49025156f9f5de2ffcbb9ad65198bc4 (patch)
treeb1459fe151bf15e7580cf7cca15214bbe7034c8c
parent77e2b9a479f16581a8eee0ea13b23ac92ac4ee70 (diff)
downloadQt-62fe4f11e49025156f9f5de2ffcbb9ad65198bc4.zip
Qt-62fe4f11e49025156f9f5de2ffcbb9ad65198bc4.tar.gz
Qt-62fe4f11e49025156f9f5de2ffcbb9ad65198bc4.tar.bz2
Test if the direction influences the returned graphics anchor object.
Pointed out by Caio.
-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 059ad33..5bb3746 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;