summaryrefslogtreecommitdiffstats
path: root/tests/testqPrefLocationService.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-11-23 17:40:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-05 11:48:26 -0800
commit6e846eb4c0c5755ddddbd696aeb6531eab5488d8 (patch)
tree08fb31f179eb2f254f0457b4fa06b22d09ef675d /tests/testqPrefLocationService.cpp
parent54f8217eec0df1876086849c8dcc594da709201a (diff)
downloadsubsurface-6e846eb4c0c5755ddddbd696aeb6531eab5488d8.tar.gz
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>
Diffstat (limited to 'tests/testqPrefLocationService.cpp')
-rw-r--r--tests/testqPrefLocationService.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/testqPrefLocationService.cpp b/tests/testqPrefLocationService.cpp
index 4e0d410cb..43c438003 100644
--- a/tests/testqPrefLocationService.cpp
+++ b/tests/testqPrefLocationService.cpp
@@ -81,15 +81,13 @@ void TestQPrefLocationService::test_multiple()
// test multiple instances have the same information
prefs.distance_threshold = 52;
- auto tst_direct = new qPrefLocationService;
-
prefs.time_threshold = 62;
auto tst = qPrefLocationService::instance();
- QCOMPARE(tst->distance_threshold(), tst_direct->distance_threshold());
- QCOMPARE(tst->time_threshold(), tst_direct->time_threshold());
- QCOMPARE(tst_direct->distance_threshold(), 52);
- QCOMPARE(tst_direct->time_threshold(), 62);
+ QCOMPARE(tst->distance_threshold(), qPrefLocationService::distance_threshold());
+ QCOMPARE(tst->time_threshold(), qPrefLocationService::time_threshold());
+ QCOMPARE(qPrefLocationService::distance_threshold(), 52);
+ QCOMPARE(qPrefLocationService::time_threshold(), 62);
}
#define TEST(METHOD, VALUE) \