tests: correct testqPref*.cpp to use static qPref* functions.

qPref* set/get functions are static.

remove creation of qPref* instances, reference
static functions.

Signed-off-by: Jan Iversen <jan@casacondor.com>
This commit is contained in:
jan Iversen 2019-11-23 17:40:56 +01:00 committed by Dirk Hohndel
parent 54f8217eec
commit 6e846eb4c0
13 changed files with 38 additions and 61 deletions

View file

@ -114,15 +114,14 @@ void TestQPrefUpdateManager::test_multiple()
// test multiple instances have the same information
prefs.update_manager.dont_check_for_updates = false;
auto tst_direct = new qPrefUpdateManager;
prefs.update_manager.dont_check_exists = false;
auto tst = qPrefUpdateManager::instance();
QCOMPARE(tst->dont_check_for_updates(), tst_direct->dont_check_for_updates());
QCOMPARE(tst->dont_check_for_updates(), qPrefUpdateManager::dont_check_for_updates());
QCOMPARE(tst->dont_check_for_updates(), false);
QCOMPARE(tst->dont_check_exists(), tst_direct->dont_check_exists());
QCOMPARE(tst_direct->dont_check_exists(), false);
QCOMPARE(tst->dont_check_exists(), qPrefUpdateManager::dont_check_exists());
QCOMPARE(qPrefUpdateManager::dont_check_exists(), false);
}
void TestQPrefUpdateManager::test_next_check()