From 12e0f28120bdfc96d7588aac690acd526208b28e Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 16 Apr 2012 17:03:13 +1000 Subject: [PATCH] Clean up test Change-Id: I750d059492c74fbdcd8d61ec3268ba10dcf0466b Reviewed-by: Bea Lam --- .../auto/quick/qquickpositioners/data/transitions.qml | 18 ++++++++++-------- .../quick/qquickpositioners/tst_qquickpositioners.cpp | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/auto/quick/qquickpositioners/data/transitions.qml b/tests/auto/quick/qquickpositioners/data/transitions.qml index 54f5705..e7570de 100644 --- a/tests/auto/quick/qquickpositioners/data/transitions.qml +++ b/tests/auto/quick/qquickpositioners/data/transitions.qml @@ -7,6 +7,8 @@ Rectangle { property int duration: 50 + property real incrementalSize: 5 + property int targetTransitionsDone property int displaceTransitionsDone @@ -88,8 +90,8 @@ Rectangle { Rectangle { property string nameData: name objectName: "wrapper" - width: 30 + index*5 - height: 30 + index*5 + width: 30 + index*root.incrementalSize + height: 30 + index*root.incrementalSize border.width: 1 Column { Text { text: index } @@ -117,8 +119,8 @@ Rectangle { Rectangle { property string nameData: name objectName: "wrapper" - width: 30 + index*5 - height: 30 + index*5 + width: 30 + index*root.incrementalSize + height: 30 + index*root.incrementalSize border.width: 1 Column { Text { text: index } @@ -146,8 +148,8 @@ Rectangle { Rectangle { property string nameData: name objectName: "wrapper" - width: 30 + index*5 - height: 30 + index*5 + width: 30 + index*root.incrementalSize + height: 30 + index*root.incrementalSize border.width: 1 Column { Text { text: index } @@ -176,8 +178,8 @@ Rectangle { Rectangle { property string nameData: name objectName: "wrapper" - width: 30 + index*5 - height: 30 + index*5 + width: 30 + index*root.incrementalSize + height: 30 + index*root.incrementalSize border.width: 1 Column { Text { text: index } diff --git a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp index 6ceacdf..12b9d66 100644 --- a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp +++ b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp @@ -596,7 +596,7 @@ void tst_qquickpositioners::addTransitions(const QString &positionerObjectName) matchItemLists(canvas->rootObject()->property("displacedTrans_targetItems").toList(), targetItems); } - checkItemPositions(positioner, &model, 5.0); // XXX fetch from qml? + checkItemPositions(positioner, &model, canvas->rootObject()->property("incrementalSize").toInt()); delete canvas; } @@ -702,7 +702,7 @@ void tst_qquickpositioners::moveTransitions(const QString &positionerObjectName) QCOMPARE(canvas->rootObject()->property("displacedTrans_targetItems").toList(), listOfEmptyObjectLists); } - checkItemPositions(positioner, &model, 5.0); + checkItemPositions(positioner, &model, canvas->rootObject()->property("incrementalSize").toInt()); delete canvas; } -- 2.7.4