diff options
author | Lorn Potter <lorn.potter@nokia.com> | 2010-12-08 11:41:06 +1000 |
---|---|---|
committer | Lorn Potter <lorn.potter@nokia.com> | 2010-12-08 11:41:06 +1000 |
commit | 96242aa2ef718b88cd81bf74064336f056c19628 (patch) | |
tree | 2420d6e7a75abd0de7298d5c38b062c8358b914e /tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp | |
parent | 5fc8909a4367f0db3aeaa43d00deefc5a628cef7 (diff) | |
parent | 53a5b5edf15fc3ddd24bf2a82fdfe27fc65254c2 (diff) |
Merge branch 'master' into test
Conflicts:
tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp
Diffstat (limited to 'tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp')
-rw-r--r-- | tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp b/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp index 03fad252db..173d15f6e1 100644 --- a/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp +++ b/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp @@ -145,6 +145,7 @@ private slots: void tst_keypadLightOn(); void tst_uniqueID(); void tst_lockStatus(); + void tst_getActiveProfileDetails(); void tst_batteryLevelChanged_data(); @@ -410,6 +411,7 @@ void tst_QSystemDeviceInfo::tst_lockStatus() } } +<<<<<<< HEAD void tst_QSystemDeviceInfo::tst_batteryLevelChanged_data() { QTest::addColumn<int>("batLevel"); @@ -731,5 +733,19 @@ void tst_QSystemDeviceInfo::lockChanged(QSystemDeviceInfo::LockType type, bool o } +void tst_QSystemDeviceInfo::tst_getActiveProfileDetails() +{ + QSystemDeviceInfo di; + QSystemDeviceInfo::ActiveProfileDetails *details = di.getActiveProfileDetails(); + int vol = details->messageRingtoneVolume(); + int vol2 = details->voiceRingtoneVolume(); + bool vib = details->vibrationActive(); + if(di.currentProfile() != QSystemDeviceInfo::UnknownProfile) { + QVERIFY(vol > -1 && vol < 101); + QVERIFY(vol2 > -1 && vol2 < 101); + QVERIFY(vib || !vib); + } +} + QTEST_MAIN(tst_QSystemDeviceInfo) #include "tst_qsystemdeviceinfo.moc" |