diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testqPrefUpdateManager.cpp | 4 | ||||
-rw-r--r-- | tests/tst_qPrefUpdateManager.qml | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/testqPrefUpdateManager.cpp b/tests/testqPrefUpdateManager.cpp index 1d2e5d98d..4dc3c2696 100644 --- a/tests/testqPrefUpdateManager.cpp +++ b/tests/testqPrefUpdateManager.cpp @@ -41,11 +41,13 @@ void TestQPrefUpdateManager::test_set_struct() tst->set_dont_check_exists(false); tst->set_last_version_used("last_version2"); tst->set_next_check(QDate::fromString("11/09/1957", "dd/MM/yyyy")); + tst->set_uuidString("uuid"); QCOMPARE(prefs.update_manager.dont_check_for_updates, false); QCOMPARE(prefs.update_manager.dont_check_exists, false); QCOMPARE(QString(prefs.update_manager.last_version_used), QString("last_version2")); QCOMPARE(QDate::fromJulianDay(prefs.update_manager.next_check), QDate::fromString("11/09/1957", "dd/MM/yyyy")); + QCOMPARE(tst->uuidString(), QString("uuid")); } void TestQPrefUpdateManager::test_set_load_struct() @@ -63,6 +65,7 @@ void TestQPrefUpdateManager::test_set_load_struct() tst->set_dont_check_exists(false); tst->set_last_version_used("last_version2"); tst->set_next_check(QDate::fromString("11/09/1957", "dd/MM/yyyy")); + tst->set_uuidString("uuid2"); prefs.update_manager.dont_check_for_updates = true; prefs.update_manager.dont_check_exists = true; @@ -73,6 +76,7 @@ void TestQPrefUpdateManager::test_set_load_struct() QCOMPARE(prefs.update_manager.dont_check_for_updates, false); QCOMPARE(QString(prefs.update_manager.last_version_used), QString("last_version2")); QCOMPARE(QDate::fromJulianDay(prefs.update_manager.next_check), QDate::fromString("11/09/1957", "dd/MM/yyyy")); + QCOMPARE(tst->uuidString(), QString("uuid2")); // dont_check_exists is NOT stored on disk QCOMPARE(prefs.update_manager.dont_check_exists, true); diff --git a/tests/tst_qPrefUpdateManager.qml b/tests/tst_qPrefUpdateManager.qml index 3554f88c8..7b3ee07a0 100644 --- a/tests/tst_qPrefUpdateManager.qml +++ b/tests/tst_qPrefUpdateManager.qml @@ -31,5 +31,9 @@ TestCase { var x4_date = Date.fromLocaleString(Qt.locale(), "01-01-2001", "dd-MM-yyyy") tst.next_check = x4_date compare(tst.next_check, x4_date) + + var x5 = tst.uuidString + tst.uuidString = "jan again" + compare(tst.uuidString, "jan again") } } |