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

@ -329,15 +329,13 @@ void TestQPrefTechnicalDetails::test_multiple()
// test multiple instances have the same information
prefs.gfhigh = 27;
auto tst_direct = new qPrefTechnicalDetails;
prefs.gflow = 25;
auto tst = qPrefTechnicalDetails::instance();
QCOMPARE(tst->gfhigh(), tst_direct->gfhigh());
QCOMPARE(tst->gflow(), tst_direct->gflow());
QCOMPARE(tst_direct->gfhigh(), 27);
QCOMPARE(tst_direct->gflow(), 25);
QCOMPARE(tst->gfhigh(), qPrefTechnicalDetails::gfhigh());
QCOMPARE(tst->gflow(), qPrefTechnicalDetails::gflow());
QCOMPARE(qPrefTechnicalDetails::gfhigh(), 27);
QCOMPARE(qPrefTechnicalDetails::gflow(), 25);
}
#define TEST(METHOD, VALUE) \