summaryrefslogtreecommitdiffstats
path: root/tests/testqPrefGeneral.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/testqPrefGeneral.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/testqPrefGeneral.cpp')
-rw-r--r--tests/testqPrefGeneral.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/testqPrefGeneral.cpp b/tests/testqPrefGeneral.cpp
index 0265fb59c..29ff6a811 100644
--- a/tests/testqPrefGeneral.cpp
+++ b/tests/testqPrefGeneral.cpp
@@ -181,15 +181,13 @@ void TestQPrefGeneral::test_multiple()
// test multiple instances have the same information
prefs.o2consumption = 17;
- auto tst_direct = new qPrefGeneral;
-
prefs.pscr_ratio = 18;
auto tst = qPrefGeneral::instance();
- QCOMPARE(tst->o2consumption(), tst_direct->o2consumption());
- QCOMPARE(tst->pscr_ratio(), tst_direct->pscr_ratio());
- QCOMPARE(tst_direct->o2consumption(), 17);
- QCOMPARE(tst_direct->pscr_ratio(), 18);
+ QCOMPARE(tst->o2consumption(), qPrefGeneral::o2consumption());
+ QCOMPARE(tst->pscr_ratio(), qPrefGeneral::pscr_ratio());
+ QCOMPARE(qPrefGeneral::o2consumption(), 17);
+ QCOMPARE(qPrefGeneral::pscr_ratio(), 18);
}
#define TEST(METHOD, VALUE) \