summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qsensor/test_backends.h4
-rw-r--r--tests/auto/qsensor/tst_qsensor.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qsensor/test_backends.h b/tests/auto/qsensor/test_backends.h
index e47cfd57..a47d7057 100644
--- a/tests/auto/qsensor/test_backends.h
+++ b/tests/auto/qsensor/test_backends.h
@@ -51,6 +51,7 @@ void unregister_test_backends();
#include <qambientlightsensor.h>
#include <qcompass.h>
#include <qgyroscope.h>
+#include <qholstersensor.h>
#include <qlightsensor.h>
#include <qmagnetometer.h>
#include <qorientationsensor.h>
@@ -109,6 +110,9 @@ PREPARE_SENSORINTERFACE(QGyroscope, QGyroscopeReading, QGyroscopeFilter, {
reading->setY(1.0);
reading->setZ(1.0);
})
+PREPARE_SENSORINTERFACE(QHolsterSensor, QHolsterReading, QHolsterFilter, {
+ reading->setHolstered(true);
+})
PREPARE_SENSORINTERFACE(QLightSensor, QLightReading, QLightFilter, {
reading->setLux(1.0);
})
diff --git a/tests/auto/qsensor/tst_qsensor.cpp b/tests/auto/qsensor/tst_qsensor.cpp
index 3dbcb68e..0845924b 100644
--- a/tests/auto/qsensor/tst_qsensor.cpp
+++ b/tests/auto/qsensor/tst_qsensor.cpp
@@ -862,6 +862,10 @@ private slots:
QCOMPARE(reading->z(), 1.0);
})
+ TEST_SENSORINTERFACE(QHolsterSensor, QHolsterReading, {
+ QCOMPARE(reading->holstered(), true);
+ })
+
TEST_SENSORINTERFACE(QLightSensor, QLightReading, {
QCOMPARE(reading->lux(), 1.0);
})