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

@ -122,14 +122,12 @@ void TestQPrefProxy::test_multiple()
// test multiple instances have the same information
prefs.proxy_port= 37;
auto tst_direct = new qPrefProxy;
prefs.proxy_type = 25;
auto tst = qPrefProxy::instance();
QCOMPARE(tst->proxy_port(), tst_direct->proxy_port());
QCOMPARE(tst->proxy_port(), qPrefProxy::proxy_port());
QCOMPARE(tst->proxy_port(), 37);
QCOMPARE(tst->proxy_type(), tst_direct->proxy_type());
QCOMPARE(tst->proxy_type(), qPrefProxy::proxy_type());
QCOMPARE(tst->proxy_type(), 25);
}