summaryrefslogtreecommitdiffstats
path: root/tests/testqPrefUpdateManager.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-19 12:00:01 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-25 11:49:47 -0700
commit1bc361b2ea1bb22a72fb8bd8ca7f58f735697a13 (patch)
tree89bd53cabb21af4603ef0a58a6b4ee5024edb28b /tests/testqPrefUpdateManager.cpp
parentbe9c47954cbed040c15d6f3d9441e463dc5433a5 (diff)
downloadsubsurface-1bc361b2ea1bb22a72fb8bd8ca7f58f735697a13.tar.gz
core/tests: add uuidString to qPrefUpdateManager
add static class variable uuidString to qPrefUpdateManager correct test cases Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests/testqPrefUpdateManager.cpp')
-rw-r--r--tests/testqPrefUpdateManager.cpp4
1 files changed, 4 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);