summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2012-05-16 10:45:30 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-14 04:18:47 +0100
commit5e2502dc7c8ab86c023b8cddb840b1728169a13d (patch)
tree83bf0d2b42accc4f5dd68fde590a6708196b9206 /tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp
parentce33c04b01fcd368c506335c2f105efbe9f4f702 (diff)
remove the need to use QTimer and use timestamps instead.
Change-Id: I6327357de9f84df3db86d714747210fe62547818 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp')
-rw-r--r--tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp b/tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp
index f1c4ad3a..fcfd9a8b 100644
--- a/tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp
+++ b/tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp
@@ -58,6 +58,8 @@ private Q_SLOTS:
void initTestCase();
void testTiltedTwist();
+ void testNotPickup();
+
void testNotHover2();
void testNotHover();
void testNotWhip();
@@ -405,7 +407,6 @@ void tst_sensorgestures_gestures::testTiltedTwist()
QStringList gestStringList;
gestStringList << "QtSensors.twist";
-
QScopedPointer<QSensorGesture> gesture(new QSensorGesture(gestStringList));
QCOMPARE(gesture->invalidIds().count(),0);
@@ -421,6 +422,28 @@ void tst_sensorgestures_gestures::testTiltedTwist()
QCOMPARE(arguments.at(0).toString(), QLatin1String("twistLeft"));
}
+void tst_sensorgestures_gestures::testNotPickup()
+{
+// QString name = "mock_data/sensordata_notpickup.dat";
+
+// QStringList gestStringList;
+// gestStringList << "QtSensors.pickup" << "QtSensors.twist";
+
+// QScopedPointer<QSensorGesture> gesture(new QSensorGesture(gestStringList));
+
+// QCOMPARE(gesture->invalidIds().count(),0);
+// QSignalSpy spy_gesture(gesture.data(), SIGNAL(detected(QString)));
+
+// QCOMPARE(mockcommonPrivate::instance()->setFile(name), true);
+// gesture.data()->startDetection();
+// QCOMPARE(gesture->isActive(),true);
+
+// QTRY_COMPARE_WITH_TIMEOUT(spy_gesture.count(),1, 7000);
+
+// QList<QVariant> arguments = spy_gesture.takeFirst();
+// QCOMPARE(arguments.at(0).toString(), QLatin1String("twistLeft"));
+}
+
QTEST_MAIN(tst_sensorgestures_gestures)