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

@ -165,13 +165,11 @@ void TestQPrefCloudStorage::test_multiple()
{
// test multiple instances have the same information
auto tst_direct = new qPrefCloudStorage;
prefs.cloud_timeout = 25;
auto tst = qPrefCloudStorage::instance();
QCOMPARE(tst->cloud_timeout(), tst_direct->cloud_timeout());
QCOMPARE(tst_direct->cloud_timeout(), 25);
QCOMPARE(tst->cloud_timeout(), qPrefCloudStorage::cloud_timeout());
QCOMPARE(qPrefCloudStorage::cloud_timeout(), 25);
}
#define TEST(METHOD, VALUE) \