summaryrefslogtreecommitdiff
path: root/tests
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
parentce33c04b01fcd368c506335c2f105efbe9f4f702 (diff)
downloadqtsensors-5e2502dc7c8ab86c023b8cddb840b1728169a13d.tar.gz
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')
-rw-r--r--tests/auto/qsensorgestures_gestures/mock_data/sensordata_notpickup.dat400
-rw-r--r--tests/auto/qsensorgestures_gestures/mockcommon.cpp1
-rw-r--r--tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp25
3 files changed, 425 insertions, 1 deletions
diff --git a/tests/auto/qsensorgestures_gestures/mock_data/sensordata_notpickup.dat b/tests/auto/qsensorgestures_gestures/mock_data/sensordata_notpickup.dat
new file mode 100644
index 0000000..ecaf670
--- /dev/null
+++ b/tests/auto/qsensorgestures_gestures/mock_data/sensordata_notpickup.dat
@@ -0,0 +1,400 @@
+orientation:402980682,5
+accelerometer: 405572082,0.210793,0,9.56232
+accelerometer: 405591125,0.134141,0.114978,9.96474
+accelerometer: 405611084,-0.229956,-0.0958148,9.58148
+accelerometer: 405631042,0.019163,0.134141,9.60065
+irProximity:405644383,0.286275
+accelerometer: 405650787,-0.210793,0.249119,9.33237
+accelerometer: 405670807,-0.153304,-0.210793,9.33237
+proximity:405673985,0
+accelerometer: 405690796,0.287445,0,9.90726
+accelerometer: 405710815,0.19163,-0.019163,9.75395
+accelerometer: 405731231,-0.019163,-4.88656,9.63897
+accelerometer: 405751129,0.134141,4.88656,9.71563
+accelerometer: 405771026,-0.0574889,0,9.58148
+accelerometer: 405791137,-0.134141,0.0766519,9.88809
+accelerometer: 405811126,-0.19163,0.0958148,9.50483
+accelerometer: 405831024,-0.0574889,-0.19163,9.81144
+accelerometer: 405851135,0.153304,-0.0766519,9.71563
+accelerometer: 405871124,-0.0574889,0.019163,9.71563
+accelerometer: 405891052,0.0958148,-0.0383259,9.90726
+accelerometer: 405911163,-0.0383259,-4.86739,9.63897
+accelerometer: 405931091,-0.153304,-0.0574889,9.69646
+accelerometer: 405951050,0.153304,-0.0958148,9.81144
+accelerometer: 405970978,-0.019163,0,9.79228
+accelerometer: 405990844,-0.0958148,-0.114978,9.524
+accelerometer: 406010833,0.114978,0.0383259,9.84977
+accelerometer: 406031067,-0.134141,0.134141,9.56232
+accelerometer: 406051056,0.153304,-0.172467,9.86893
+accelerometer: 406071045,0.0383259,-4.82907,9.56232
+accelerometer: 406090973,-0.0383259,4.88656,9.60065
+accelerometer: 406110992,-0.114978,-0.019163,9.73479
+accelerometer: 406130951,-0.114978,0.0574889,9.61981
+accelerometer: 406150940,-0.0383259,0.210793,9.50483
+accelerometer: 406170929,-0.153304,0.019163,9.71563
+accelerometer: 406190796,0.0574889,0.019163,9.6773
+accelerometer: 406210937,0.114978,0.019163,9.60065
+accelerometer: 406231109,-0.0574889,-0.019163,9.54316
+accelerometer: 406250885,-0.153304,0.0958148,9.6773
+accelerometer: 406270965,0.019163,0.0958148,9.79228
+accelerometer: 406290954,-0.0574889,-0.019163,9.56232
+accelerometer: 406310974,0,0.0574889,9.71563
+accelerometer: 406330993,-0.249119,0.0958148,9.65814
+accelerometer: 406350799,-0.0574889,0.0383259,9.63897
+accelerometer: 406371002,0.210793,-4.86739,9.71563
+accelerometer: 406391021,-0.153304,0.0766519,9.71563
+accelerometer: 406410919,-0.249119,-0.019163,9.63897
+accelerometer: 406430938,-0.0766519,0.0766519,9.86893
+accelerometer: 406450744,-0.019163,-0.019163,9.6773
+accelerometer: 406471405,-0.172467,0.0574889,9.65814
+accelerometer: 406490997,0.019163,-0.019163,9.69646
+accelerometer: 406510925,0.153304,0.0383259,9.8306
+accelerometer: 406531006,-0.0766519,0.19163,9.77311
+accelerometer: 406550750,0.0958148,-0.0958148,9.6773
+accelerometer: 406570953,0.229956,-0.0766519,9.58148
+accelerometer: 406591003,-0.153304,-0.114978,9.73479
+accelerometer: 406610962,0.0766519,-0.134141,9.63897
+accelerometer: 406630951,-0.0383259,-4.88656,9.58148
+accelerometer: 406650909,-0.153304,0.0574889,9.58148
+accelerometer: 406670959,-0.0574889,-0.153304,9.63897
+accelerometer: 406690613,0.0383259,-0.19163,9.63897
+accelerometer: 406710968,-0.0574889,-0.0766519,9.56232
+accelerometer: 406730987,-0.134141,0.0383259,9.77311
+accelerometer: 406751068,0.0574889,0.0766519,9.81144
+accelerometer: 406770935,-0.0383259,0.019163,9.63897
+accelerometer: 406790954,0.114978,0.0574889,9.90726
+accelerometer: 406810943,0.019163,0.0383259,9.65814
+accelerometer: 406830993,-0.249119,-0.019163,9.60065
+accelerometer: 406850555,-0.134141,0.0766519,9.84977
+accelerometer: 406870971,-0.210793,-0.0383259,9.75395
+accelerometer: 406890991,0.0383259,0.0383259,9.73479
+accelerometer: 406910949,0.019163,-0.153304,9.60065
+accelerometer: 406930969,0.0766519,-0.0574889,9.524
+accelerometer: 406950714,0.153304,0.019163,9.69646
+accelerometer: 406971222,0.0383259,-4.82907,9.73479
+accelerometer: 406991058,-0.019163,-4.90572,9.65814
+accelerometer: 407010864,0.0383259,0.0766519,9.79228
+accelerometer: 407030975,0.0958148,-4.79074,9.58148
+accelerometer: 407050811,-0.134141,4.73325,9.61981
+accelerometer: 407070923,-0.0958148,0.0383259,9.71563
+accelerometer: 407090881,0.0766519,0.0766519,9.79228
+accelerometer: 407110748,-0.134141,0.0766519,9.54316
+accelerometer: 407130768,-0.0958148,0.0574889,9.6773
+accelerometer: 407150818,-0.0574889,-0.172467,9.63897
+accelerometer: 407170959,-0.134141,-0.0383259,9.6773
+accelerometer: 407190918,0.0574889,0.019163,9.69646
+accelerometer: 407210968,0.019163,-0.0383259,9.63897
+accelerometer: 407230957,-0.172467,0.0958148,9.73479
+accelerometer: 407250793,-0.0574889,0,9.60065
+accelerometer: 407270935,-0.134141,-0.0383259,9.63897
+accelerometer: 407290954,0,-0.0958148,9.65814
+accelerometer: 407311004,-4.84823,-0.0574889,9.73479
+accelerometer: 407330963,-0.0958148,0.114978,9.81144
+accelerometer: 407350769,0.134141,0.0383259,9.63897
+accelerometer: 407371032,0.0574889,0,9.63897
+accelerometer: 407390930,0.0574889,-0.0383259,9.50483
+accelerometer: 407410980,-0.114978,0,9.524
+accelerometer: 407430938,-0.134141,0.019163,9.6773
+accelerometer: 407450866,-0.0766519,0.0958148,9.81144
+accelerometer: 407470764,-0.019163,-0.019163,9.86893
+accelerometer: 407490905,0.019163,-0.019163,9.63897
+accelerometer: 407510833,-0.0383259,0.019163,9.6773
+accelerometer: 407530914,-0.19163,0.0766519,9.63897
+accelerometer: 407550811,-0.249119,0.229956,9.61981
+accelerometer: 407570923,0.134141,0.0383259,9.54316
+accelerometer: 407590973,-0.153304,-0.019163,9.56232
+accelerometer: 407610962,-0.153304,0,9.63897
+accelerometer: 407630951,0.0383259,0.0958148,9.81144
+accelerometer: 407650787,-0.0574889,0.0766519,9.48567
+accelerometer: 407670898,0.0383259,-0.0574889,9.79228
+accelerometer: 407690796,-0.344933,0.0958148,9.56232
+accelerometer: 407710998,-0.019163,-0.0383259,9.73479
+accelerometer: 407731018,-0.134141,0,9.60065
+accelerometer: 407750824,0.0766519,0.019163,9.73479
+accelerometer: 407770874,0.019163,0.0766519,9.75395
+accelerometer: 407790954,-0.229956,4.88656,9.63897
+accelerometer: 407811004,-0.0766519,-4.86739,9.75395
+accelerometer: 407830963,0.0766519,-0.114978,9.63897
+accelerometer: 407850799,0.0766519,0.0383259,9.6773
+accelerometer: 407870910,0.0766519,0.019163,9.73479
+accelerometer: 407890930,0.0383259,-0.0766519,9.56232
+accelerometer: 407910919,0.019163,-0.19163,9.69646
+accelerometer: 407930969,-0.114978,0.153304,9.65814
+accelerometer: 407950927,0.0574889,4.73325,9.50483
+accelerometer: 407970855,-0.229956,4.84823,9.61981
+accelerometer: 407990967,-0.134141,-0.0383259,9.42818
+accelerometer: 408011078,-0.0574889,0.19163,9.65814
+accelerometer: 408031006,0.0383259,-0.0766519,9.58148
+accelerometer: 408050995,-0.0574889,-0.0958148,9.63897
+accelerometer: 408070923,0.019163,0.019163,9.60065
+accelerometer: 408091003,-0.0383259,0.114978,9.60065
+accelerometer: 408110992,-0.153304,-0.172467,9.44734
+accelerometer: 408130951,0,0.134141,9.54316
+accelerometer: 408150970,-0.134141,0.0766519,9.50483
+accelerometer: 408170898,0,-0.0574889,9.77311
+accelerometer: 408190918,-0.114978,-0.0383259,9.50483
+accelerometer: 408210968,-0.0958148,0.0383259,9.48567
+accelerometer: 408231079,-0.019163,0.0766519,9.90726
+accelerometer: 408250976,0.019163,-0.0766519,9.8306
+accelerometer: 408270935,0.0383259,-0.0958148,9.63897
+accelerometer: 408290954,0.0574889,0.0383259,9.6773
+accelerometer: 408310974,-0.0766519,-0.019163,9.42818
+accelerometer: 408330963,0.114978,-0.0383259,9.60065
+accelerometer: 408350769,0.0766519,-0.0383259,9.65814
+accelerometer: 408370971,0.019163,-4.86739,9.69646
+accelerometer: 408390960,0,0.153304,9.71563
+accelerometer: 408410949,0.0958148,0.0383259,9.69646
+accelerometer: 408430999,-0.153304,-0.019163,9.79228
+accelerometer: 408450805,-0.0383259,-0.0766519,9.65814
+accelerometer: 408470764,-0.0958148,0.153304,9.75395
+accelerometer: 408490936,-0.172467,4.88656,9.69646
+accelerometer: 408510986,0,0.019163,9.69646
+accelerometer: 408530975,0,-0.0958148,9.81144
+accelerometer: 408550995,-0.0958148,0.0574889,9.50483
+accelerometer: 408570923,0.0574889,-0.114978,9.60065
+accelerometer: 408590942,-0.0383259,-0.0766519,9.79228
+accelerometer: 408610931,0.0958148,-4.77158,9.65814
+accelerometer: 408630920,-0.0958148,-4.88656,9.58148
+accelerometer: 408650940,-0.19163,-0.019163,9.77311
+accelerometer: 408670898,0.019163,0.0574889,9.6773
+accelerometer: 408690613,0.019163,-0.0958148,9.8306
+accelerometer: 408710998,-0.172467,0,9.60065
+accelerometer: 408730957,-0.210793,-0.0383259,9.65814
+accelerometer: 408750946,-0.134141,-4.88656,9.69646
+accelerometer: 408770935,-0.0958148,0.0766519,9.77311
+accelerometer: 408790954,-0.0383259,0,9.56232
+accelerometer: 408810974,0.172467,-0.114978,9.69646
+accelerometer: 408830932,0.0574889,-0.0574889,9.58148
+accelerometer: 408850952,0,0.19163,9.65814
+accelerometer: 408870910,0,0.0958148,9.84977
+accelerometer: 408890930,-0.0574889,0.0766519,9.50483
+accelerometer: 408910949,-0.229956,4.71409,9.40902
+accelerometer: 408930999,0.019163,0.0383259,9.6773
+accelerometer: 408950927,-0.19163,0.0958148,9.65814
+accelerometer: 408970886,-0.0958148,0.0766519,9.65814
+accelerometer: 408990967,0.114978,-0.019163,9.60065
+accelerometer: 409010833,-0.114978,0.0383259,9.50483
+accelerometer: 409031036,-0.0383259,-4.88656,9.48567
+accelerometer: 409050995,-0.210793,0.019163,9.63897
+accelerometer: 409071075,-0.134141,0.19163,9.60065
+accelerometer: 409090942,0.153304,-0.0574889,9.75395
+accelerometer: 409110931,0,0.0574889,9.63897
+accelerometer: 409130951,-0.134141,0.0383259,9.69646
+accelerometer: 409150940,-0.0574889,4.82907,9.75395
+accelerometer: 409171142,0.0766519,0.0574889,9.81144
+accelerometer: 409190948,-0.0574889,-0.172467,9.46651
+accelerometer: 409210937,0.134141,-0.153304,9.48567
+accelerometer: 409230957,-0.153304,0.19163,9.6773
+accelerometer: 409250946,0.0574889,0.0383259,9.6773
+accelerometer: 409271087,0,-0.134141,9.69646
+accelerometer: 409290954,0.0958148,4.88656,9.65814
+accelerometer: 409310974,0.0766519,-0.0766519,9.65814
+accelerometer: 409330963,0.19163,-0.0958148,9.77311
+accelerometer: 409350799,-0.0383259,0.268282,9.79228
+accelerometer: 409370605,-0.134141,0.0574889,9.61981
+accelerometer: 409390960,-0.0766519,0.0766519,9.56232
+accelerometer: 409410949,0.0766519,-4.82907,9.56232
+accelerometer: 409430816,-0.0958148,-0.134141,9.77311
+accelerometer: 409450805,0.019163,0.153304,9.77311
+accelerometer: 409470703,-0.153304,0,9.65814
+accelerometer: 409490936,0.0958148,-0.0958148,9.60065
+accelerometer: 409510894,0.019163,0.0383259,9.65814
+accelerometer: 409530945,-0.114978,-0.0574889,9.6773
+accelerometer: 409550995,-0.153304,0.172467,9.54316
+accelerometer: 409570800,-0.134141,-0.0383259,9.56232
+accelerometer: 409590942,-0.0574889,0.019163,9.61981
+accelerometer: 409610962,0.0766519,-0.0766519,9.69646
+accelerometer: 409630981,-0.0383259,-0.134141,9.60065
+accelerometer: 409650940,-0.0958148,-0.114978,9.56232
+accelerometer: 409670807,0.0958148,-0.134141,9.63897
+accelerometer: 409691284,-0.210793,-0.0958148,9.61981
+accelerometer: 409710937,-0.019163,-0.0574889,9.71563
+accelerometer: 409730957,-0.0574889,-0.114978,9.69646
+accelerometer: 409750946,0,0,9.69646
+accelerometer: 409770782,0.0766519,-0.019163,9.58148
+accelerometer: 409790954,-0.0574889,0.0383259,9.56232
+accelerometer: 409810974,-0.153304,4.67576,9.58148
+accelerometer: 409830963,-0.0383259,4.88656,9.6773
+accelerometer: 409850952,0.0383259,0.0958148,9.75395
+accelerometer: 409870788,-0.153304,0,9.61981
+accelerometer: 409890899,-0.0958148,-0.0766519,9.65814
+accelerometer: 409910919,-0.0958148,-0.0574889,9.38986
+accelerometer: 409930938,0.0766519,0.0766519,9.69646
+accelerometer: 409950988,-0.0574889,-0.114978,9.61981
+accelerometer: 409970794,-0.0383259,-0.0958148,9.56232
+accelerometer: 409990967,-0.134141,-0.114978,9.73479
+accelerometer: 410010925,0.0574889,0.0383259,9.73479
+accelerometer: 410031036,-0.0766519,0.0574889,9.6773
+accelerometer: 410050995,-0.0766519,-0.0766519,9.56232
+accelerometer: 410070800,-0.0574889,0.0574889,9.524
+accelerometer: 410090973,-0.0766519,0.114978,9.58148
+accelerometer: 410110931,-0.0958148,4.84823,9.524
+accelerometer: 410130981,-0.153304,0.0958148,9.61981
+accelerometer: 410150940,0,0.0383259,9.69646
+accelerometer: 410170807,0.0958148,-0.114978,9.60065
+accelerometer: 410190887,-0.0958148,0.0383259,9.63897
+accelerometer: 410210968,0.0574889,-0.134141,9.71563
+accelerometer: 410231079,-0.172467,-0.0958148,9.6773
+accelerometer: 410251007,-0.0383259,-0.019163,9.54316
+accelerometer: 410270813,0.019163,-0.0383259,9.69646
+accelerometer: 410290893,-0.0574889,-0.0766519,9.56232
+accelerometer: 410310943,-0.114978,-0.0574889,9.69646
+accelerometer: 410330963,0.019163,-0.019163,9.71563
+accelerometer: 410350799,-0.19163,0.134141,9.60065
+accelerometer: 410370819,-0.114978,-0.019163,9.69646
+accelerometer: 410390930,0.0383259,0.0574889,9.56232
+accelerometer: 410410919,0.0574889,-4.82907,9.81144
+accelerometer: 410430938,0.0574889,-4.88656,9.73479
+accelerometer: 410450805,0.019163,0.19163,9.58148
+accelerometer: 410470703,0.0383259,-0.0574889,9.54316
+accelerometer: 410490936,-0.114978,0.172467,9.6773
+accelerometer: 410510956,-0.0766519,-0.0958148,9.6773
+accelerometer: 410530975,0.0958148,-0.0383259,9.69646
+accelerometer: 410550934,0.134141,-0.0766519,9.71563
+accelerometer: 410570923,-0.0383259,-4.90572,9.69646
+accelerometer: 410590912,-0.268282,0.019163,9.60065
+accelerometer: 410610962,-0.153304,-0.019163,9.61981
+accelerometer: 410630951,-0.134141,0.0766519,9.60065
+accelerometer: 410650940,-0.229956,0.0766519,9.58148
+accelerometer: 410670929,0.0574889,-0.019163,9.58148
+accelerometer: 410691742,0.0766519,0,9.8306
+accelerometer: 410710998,0,-4.84823,9.69646
+accelerometer: 410730957,-0.172467,0.0574889,9.46651
+accelerometer: 410750946,-0.172467,-0.0383259,9.48567
+accelerometer: 410770935,-0.0766519,-0.114978,9.54316
+accelerometer: 410790924,-0.153304,0.019163,9.56232
+accelerometer: 410810943,-0.0958148,0.153304,9.61981
+accelerometer: 410830963,0.0958148,0.172467,9.63897
+accelerometer: 410850952,-0.0383259,-0.0574889,9.73479
+accelerometer: 410870941,-0.0383259,0.0383259,9.60065
+accelerometer: 410890899,-0.134141,0.134141,9.58148
+accelerometer: 410910980,-0.0958148,-0.0958148,9.58148
+accelerometer: 410930969,0,0.210793,9.69646
+accelerometer: 410950958,0.0574889,-0.019163,9.75395
+accelerometer: 410970947,-0.0383259,-0.0574889,9.6773
+accelerometer: 410990936,0.0574889,-0.0574889,9.71563
+accelerometer: 411010864,-0.19163,0.0383259,9.84977
+accelerometer: 411031036,0,-0.0766519,9.54316
+accelerometer: 411050934,0.0574889,-0.172467,9.69646
+accelerometer: 411070984,-0.153304,0.210793,9.58148
+accelerometer: 411090912,0.019163,0.0574889,9.73479
+accelerometer: 411110931,0.134141,-0.172467,9.61981
+accelerometer: 411131805,-0.0574889,0,9.61981
+accelerometer: 411151245,-0.210793,-0.019163,9.46651
+accelerometer: 411170959,-0.0958148,0.19163,9.6773
+accelerometer: 411190979,0.0958148,0,9.65814
+accelerometer: 411211029,-0.0574889,-0.0574889,9.75395
+accelerometer: 411230957,0.0766519,0.0958148,9.69646
+accelerometer: 411250793,0.229956,-0.0958148,9.71563
+accelerometer: 411270874,-0.0958148,0.172467,9.524
+accelerometer: 411290924,0,0,9.75395
+accelerometer: 411310974,-0.019163,-0.019163,9.63897
+accelerometer: 411330932,-0.0383259,0.19163,9.6773
+accelerometer: 411350799,-0.0383259,0.0958148,9.61981
+accelerometer: 411371002,0.0574889,-0.134141,9.8306
+accelerometer: 411390899,-0.0383259,-0.0958148,9.63897
+accelerometer: 411410980,-0.0383259,0.153304,9.69646
+accelerometer: 411430969,-0.19163,-0.114978,9.88809
+accelerometer: 411450958,0.210793,0,9.75395
+accelerometer: 411470703,0.0958148,-0.19163,9.58148
+accelerometer: 411490936,-0.0766519,0.019163,9.63897
+accelerometer: 411510833,-0.019163,-0.153304,9.6773
+accelerometer: 411530945,-0.019163,0.0958148,9.524
+accelerometer: 411550964,-0.0383259,-4.86739,9.65814
+accelerometer: 411570953,0.114978,4.84823,9.73479
+accelerometer: 411591095,-0.210793,0.0766519,9.6773
+accelerometer: 411610931,-0.114978,0.172467,9.88809
+accelerometer: 411630920,-0.0383259,0.0958148,9.71563
+accelerometer: 411651001,-0.019163,-0.019163,9.6773
+accelerometer: 411670959,0.210793,-0.0766519,9.54316
+accelerometer: 411691040,-0.0766519,0.0383259,9.63897
+accelerometer: 411710785,-0.0574889,0.019163,9.71563
+accelerometer: 411730835,-0.153304,0,9.69646
+accelerometer: 411750976,-0.153304,0.0574889,9.56232
+accelerometer: 411770935,-0.153304,0,9.61981
+accelerometer: 411791015,0.019163,-0.134141,9.48567
+accelerometer: 411810943,-0.019163,0.114978,9.60065
+accelerometer: 411830932,0,-0.0383259,9.77311
+accelerometer: 411850921,0.0958148,-0.172467,9.6773
+accelerometer: 411870971,0.0383259,-0.0383259,9.73479
+accelerometer: 411890564,-0.0766519,-0.114978,9.75395
+accelerometer: 411910858,-0.0766519,-0.019163,9.63897
+accelerometer: 411930908,0.0383259,0.019163,9.71563
+accelerometer: 411950927,0.019163,0.114978,9.63897
+accelerometer: 411971100,-0.0958148,4.77158,9.79228
+accelerometer: 411990814,0.0958148,-0.0383259,9.60065
+accelerometer: 412010894,0.0383259,-0.0383259,9.69646
+accelerometer: 412031006,-0.114978,0.19163,9.60065
+accelerometer: 412050964,-0.19163,0.0383259,9.61981
+accelerometer: 412070953,-0.0766519,0,9.50483
+accelerometer: 412090790,0.364096,-0.134141,9.60065
+accelerometer: 412110779,-0.114978,0.114978,9.58148
+accelerometer: 412130859,-0.0766519,-0.019163,9.50483
+accelerometer: 412150757,0.153304,-0.0574889,9.79228
+accelerometer: 412170868,0.0383259,-4.84823,9.6773
+accelerometer: 412190765,-0.0574889,-0.0383259,9.63897
+accelerometer: 412210907,-0.0766519,0,9.81144
+accelerometer: 412231109,-0.153304,-4.82907,9.79228
+accelerometer: 412250976,-0.019163,-0.114978,9.69646
+accelerometer: 412270935,-0.153304,0.172467,9.42818
+accelerometer: 412290802,-0.153304,-0.0958148,9.65814
+accelerometer: 412311004,-0.114978,-0.0383259,9.61981
+accelerometer: 412330963,-0.153304,-0.0574889,9.63897
+accelerometer: 412350799,-0.0766519,-0.0574889,9.63897
+accelerometer: 412371002,-0.19163,-0.0958148,9.61981
+accelerometer: 412390838,0.0383259,0.134141,9.58148
+accelerometer: 412410919,-0.0766519,-0.134141,9.54316
+accelerometer: 412430938,-0.19163,-4.88656,9.56232
+accelerometer: 412450927,-0.172467,0.0383259,9.63897
+accelerometer: 412470703,-0.172467,0.19163,9.44734
+accelerometer: 412490783,0.0574889,0.114978,9.65814
+accelerometer: 412510925,-0.0574889,-0.134141,9.77311
+accelerometer: 412530975,0.0383259,0.019163,9.81144
+accelerometer: 412550903,0.019163,-0.019163,9.73479
+accelerometer: 412570923,0.0574889,0.114978,9.50483
+accelerometer: 412590820,0.0766519,-0.0574889,9.71563
+accelerometer: 412610931,0.0383259,-0.0766519,9.65814
+accelerometer: 412630951,0,-0.0766519,9.60065
+accelerometer: 412650970,0.0766519,0.0766519,9.73479
+accelerometer: 412670929,0.19163,-0.210793,9.71563
+accelerometer: 412690796,0.0574889,0.0574889,9.6773
+accelerometer: 412710937,0.134141,-4.88656,9.44734
+accelerometer: 412730957,0,0,9.73479
+accelerometer: 412750915,0.0383259,-0.114978,9.56232
+accelerometer: 412770935,-0.0766519,-0.0958148,9.524
+accelerometer: 412790832,0.134141,0,9.6773
+accelerometer: 412810974,-0.134141,0.134141,9.54316
+accelerometer: 412830963,-0.134141,0.0958148,9.63897
+accelerometer: 412850952,0.0383259,-0.210793,9.54316
+accelerometer: 412870941,0.0383259,4.88656,9.8306
+accelerometer: 412890777,0.0766519,0.0958148,9.60065
+accelerometer: 412910888,0.0383259,-0.0574889,9.54316
+accelerometer: 412930938,0,-0.0574889,9.65814
+accelerometer: 412950927,-0.210793,0.0766519,9.56232
+accelerometer: 412970916,-0.210793,-0.0766519,9.65814
+accelerometer: 412990967,0.134141,-0.0383259,9.65814
+accelerometer: 413010650,-0.0574889,0.0574889,9.524
+accelerometer: 413031097,-0.019163,0.114978,9.63897
+accelerometer: 413050934,-0.0766519,0.134141,9.65814
+accelerometer: 413070923,0.0958148,-0.0574889,9.77311
+accelerometer: 413090942,0.019163,0.210793,9.6773
+accelerometer: 413110901,-0.114978,0.153304,9.75395
+accelerometer: 413130920,0.019163,-0.172467,9.54316
+accelerometer: 413150940,-0.0766519,0.019163,9.50483
+accelerometer: 413170929,-4.88656,-0.0766519,9.77311
+accelerometer: 413190918,0.019163,-0.0383259,9.65814
+accelerometer: 413210663,-0.0574889,-0.306608,9.6773
+accelerometer: 413231018,-0.0574889,0,9.60065
+accelerometer: 413250915,0.383259,0.019163,9.86893
+accelerometer: 413270935,-0.268282,-0.210793,9.17906
+accelerometer: 413290893,0.440748,-0.019163,9.90726
+accelerometer: 413311920,0.210793,0,9.75395
+accelerometer: 413330780,-0.019163,-0.0958148,9.61981
+accelerometer: 413350769,-0.0958148,-0.019163,9.65814
+accelerometer: 413370910,-0.114978,0.0574889,9.6773
+accelerometer: 413390899,0.019163,-0.0958148,9.77311
+accelerometer: 413410888,-0.268282,0.210793,9.48567
+accelerometer: 413430969,-0.019163,-0.0574889,9.58148
+accelerometer: 413450958,-0.0766519,0.019163,9.65814
+accelerometer: 413470794,-0.134141,4.80991,9.58148
+
diff --git a/tests/auto/qsensorgestures_gestures/mockcommon.cpp b/tests/auto/qsensorgestures_gestures/mockcommon.cpp
index f9b0498..44e9ce0 100644
--- a/tests/auto/qsensorgestures_gestures/mockcommon.cpp
+++ b/tests/auto/qsensorgestures_gestures/mockcommon.cpp
@@ -99,6 +99,7 @@ bool mockcommonPrivate::parseData(const QString &line)
if (sensorToken == QLatin1String("accelerometer")) {
if (!firstRun) {
+
Q_EMIT accelData(data);
if (prevts == 0 || prevts > 90000 )
prevts = 20000; // use 20 Hz
diff --git a/tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp b/tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp
index f1c4ad3..fcfd9a8 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)