From 9a186ba66506963b9d88518d5cea0846825ba494 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 7 Jan 2011 11:27:25 +1000 Subject: Add PinchArea autotests. Task-number: QTBUG-15491 --- tests/auto/declarative/declarative.pro | 1 + .../declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index f0fcfa9..51597bd 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -45,6 +45,7 @@ SUBDIRS += \ qdeclarativemousearea \ qdeclarativeparticles \ qdeclarativepathview \ + qdeclarativepincharea \ qdeclarativepixmapcache \ qdeclarativepositioners \ qdeclarativeproperty \ diff --git a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp index d1015fc..f175033 100644 --- a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp +++ b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp @@ -229,7 +229,7 @@ void tst_QDeclarativePinchArea::scale() QTest::touchEvent(vp).move(0, p1).move(1, p2); QCOMPARE(root->property("scale").toReal(), 1.5); - QCOMPARE(root->property("center").toPointF(), QPointF(90, 90)); + QCOMPARE(root->property("center").toPointF(), QPointF(40, 40)); // blackrect is at 50,50 QCOMPARE(blackRect->scale(), 1.5); // scale beyond bound @@ -283,7 +283,7 @@ void tst_QDeclarativePinchArea::pan() p2 += QPoint(10,10); QTest::touchEvent(vp).move(0, p1).move(1, p2); - QCOMPARE(root->property("center").toPointF(), QPointF(110, 110)); + QCOMPARE(root->property("center").toPointF(), QPointF(60, 60)); // blackrect is at 50,50 QCOMPARE(blackRect->x(), 60.0); QCOMPARE(blackRect->y(), 60.0); -- cgit v0.12