summaryrefslogtreecommitdiffstats
path: root/tests/testqPrefDiveComputer.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/testqPrefDiveComputer.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/testqPrefDiveComputer.cpp')
-rw-r--r--tests/testqPrefDiveComputer.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/testqPrefDiveComputer.cpp b/tests/testqPrefDiveComputer.cpp
index fff589c17..36967bea6 100644
--- a/tests/testqPrefDiveComputer.cpp
+++ b/tests/testqPrefDiveComputer.cpp
@@ -101,12 +101,11 @@ void TestQPrefDiveComputer::test_struct_disk()
void TestQPrefDiveComputer::test_multiple()
{
// test multiple instances have the same information
- auto tst_direct = new qPrefDiveComputer;
auto tst = qPrefDiveComputer::instance();
prefs.dive_computer.device = copy_qstring("mine");
- QCOMPARE(tst->device(), tst_direct->device());
+ QCOMPARE(tst->device(), qPrefDiveComputer::device());
QCOMPARE(tst->device(), QString("mine"));
}