diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-19 11:05:55 +0100 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-19 11:06:33 +0100 |
commit | 50c16eab20a6d9884ab3149ef59137a10de63e6d (patch) | |
tree | 2684617d911514147283516ddd15803a4049da61 /tests/auto/qsensor/tst_qsensor.cpp | |
parent | d2cafb8506b798bad7fa56f19557dd6e1cb25cd7 (diff) | |
parent | 879e5536b033302b2ad976750cd2351674e161d6 (diff) | |
download | qtsensors-50c16eab20a6d9884ab3149ef59137a10de63e6d.tar.gz |
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle
Change-Id: Idce0f9b94f9e585abfb6903f554500a06f4f8aaa
Diffstat (limited to 'tests/auto/qsensor/tst_qsensor.cpp')
-rw-r--r-- | tests/auto/qsensor/tst_qsensor.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qsensor/tst_qsensor.cpp b/tests/auto/qsensor/tst_qsensor.cpp index a4591aa..a410f71 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)); } }; |