summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2010-09-22 04:46:34 +1000
committerLorn Potter <lorn.potter@nokia.com>2010-09-22 04:46:34 +1000
commitc94dc3176998f4fd76df1f3803554ce1a5952965 (patch)
tree8b9cda503c9ba678541f5532127bf65c2c7a5b39 /tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp
parentce4d62a79220fd0409fbbbf5264ea51d08c552cf (diff)
remove the signal tests for battery level changed, as these will fail.
Until we simulate the system, or wait for however long in the autotest... Task-number: MOBILITY-1451
Diffstat (limited to 'tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp')
-rw-r--r--tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp b/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp
index db58c8c22c..aa386a7317 100644
--- a/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp
+++ b/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp
@@ -156,12 +156,13 @@ void tst_QSystemDeviceInfo::tst_batteryLevel()
QSystemDeviceInfo di;
QVERIFY(di.batteryLevel() > -1);
- if(di.currentPowerState() == QSystemDeviceInfo::WallPowerChargingBattery) {
- QSignalSpy batSpy(&di, SIGNAL(batteryLevelChanged(int)));
- QVERIFY(!batSpy.isEmpty());
- int level = batSpy.first().at(0).toInt();
- QVERIFY( level > -1 || level < 101);
- }
+// until we simulate this, or wait the signalspy to olong, this will always fail
+// if(di.currentPowerState() == QSystemDeviceInfo::WallPowerChargingBattery) {
+// QSignalSpy batSpy(&di, SIGNAL(batteryLevelChanged(int)));
+// QVERIFY(!batSpy.isEmpty());
+// int level = batSpy.first().at(0).toInt();
+// QVERIFY( level > -1 || level < 101);
+// }
}
void tst_QSystemDeviceInfo::tst_batteryStatus()
@@ -178,16 +179,17 @@ void tst_QSystemDeviceInfo::tst_batteryStatus()
QVERIFY(di.batteryStatus() == QSystemDeviceInfo::BatteryNormal);
}
- if(di.currentPowerState() == QSystemDeviceInfo::WallPowerChargingBattery) {
- QSignalSpy batSpy(&di, SIGNAL(batteryStatusChanged(QSystemDeviceInfo::BatteryStatus)));
- QVERIFY(!batSpy.isEmpty());
- QSystemDeviceInfo::BatteryStatus status = qvariant_cast<QSystemDeviceInfo::BatteryStatus>(batSpy.first().at(0));
- QVERIFY( status == QSystemDeviceInfo::NoBatteryLevel
- || status == QSystemDeviceInfo::BatteryCritical
- || status == QSystemDeviceInfo::BatteryVeryLow
- || status == QSystemDeviceInfo::BatteryLow
- || status == QSystemDeviceInfo::BatteryNormal);
- }
+ // until we simulate this, or wait the signalspy to olong, this will always fail
+// if(di.currentPowerState() == QSystemDeviceInfo::WallPowerChargingBattery) {
+// QSignalSpy batSpy(&di, SIGNAL(batteryStatusChanged(QSystemDeviceInfo::BatteryStatus)));
+// QVERIFY(!batSpy.isEmpty());
+// QSystemDeviceInfo::BatteryStatus status = qvariant_cast<QSystemDeviceInfo::BatteryStatus>(batSpy.first().at(0));
+// QVERIFY( status == QSystemDeviceInfo::NoBatteryLevel
+// || status == QSystemDeviceInfo::BatteryCritical
+// || status == QSystemDeviceInfo::BatteryVeryLow
+// || status == QSystemDeviceInfo::BatteryLow
+// || status == QSystemDeviceInfo::BatteryNormal);
+// }
}
void tst_QSystemDeviceInfo::tst_currentProfile()