summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsensor/tst_qsensor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qsensor/tst_qsensor.cpp')
-rw-r--r--tests/auto/qsensor/tst_qsensor.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qsensor/tst_qsensor.cpp b/tests/auto/qsensor/tst_qsensor.cpp
index a4591aa4..a410f711 100644
--- a/tests/auto/qsensor/tst_qsensor.cpp
+++ b/tests/auto/qsensor/tst_qsensor.cpp
@@ -847,10 +847,18 @@ private slots:
QCOMPARE(reading->z(), 1.0);
})
+ TEST_SENSORINTERFACE(QAltimeter, QAltimeterReading, {
+ QCOMPARE(reading->altitude(), 8848.0);
+ })
+
TEST_SENSORINTERFACE(QAmbientLightSensor, QAmbientLightReading, {
QCOMPARE(reading->lightLevel(), QAmbientLightReading::Twilight);
})
+ TEST_SENSORINTERFACE(QAmbientTemperatureSensor, QAmbientTemperatureReading, {
+ QCOMPARE(reading->temperature(), 30.0);
+ })
+
TEST_SENSORINTERFACE(QCompass, QCompassReading, {
QCOMPARE(reading->azimuth(), 1.0);
QCOMPARE(reading->calibrationLevel(), 1.0);
@@ -862,6 +870,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);
})
@@ -877,6 +889,10 @@ private slots:
QCOMPARE(reading->orientation(), QOrientationReading::LeftUp);
})
+ TEST_SENSORINTERFACE(QPressureSensor, QPressureReading, {
+ QCOMPARE(reading->pressure(), 1.0);
+ })
+
TEST_SENSORINTERFACE(QProximitySensor, QProximityReading, {
QCOMPARE(reading->close(), true);
})
@@ -959,6 +975,7 @@ private slots:
QVERIFY(!sensor.isFeatureSupported(QSensor::Buffering));
QVERIFY(!sensor.isFeatureSupported(QSensor::GeoValues));
QVERIFY(!sensor.isFeatureSupported(QSensor::FieldOfView));
+ QVERIFY(!sensor.isFeatureSupported(QSensor::AccelerationMode));
// Connect to backend - according to the testsensorimpl implementation, AlwaysOn and
// GeoValues should be supported afterwards
@@ -968,6 +985,7 @@ private slots:
QVERIFY(!sensor.isFeatureSupported(QSensor::Buffering));
QVERIFY(sensor.isFeatureSupported(QSensor::GeoValues));
QVERIFY(!sensor.isFeatureSupported(QSensor::FieldOfView));
+ QVERIFY(!sensor.isFeatureSupported(QSensor::AccelerationMode));
}
};