diff options
author | jan Iversen <jan@casacondor.com> | 2019-11-23 17:40:56 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-12-05 11:48:26 -0800 |
commit | 6e846eb4c0c5755ddddbd696aeb6531eab5488d8 (patch) | |
tree | 08fb31f179eb2f254f0457b4fa06b22d09ef675d /tests/testqPrefUnits.cpp | |
parent | 54f8217eec0df1876086849c8dcc594da709201a (diff) | |
download | subsurface-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/testqPrefUnits.cpp')
-rw-r--r-- | tests/testqPrefUnits.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/testqPrefUnits.cpp b/tests/testqPrefUnits.cpp index 122a35ce9..decae35a8 100644 --- a/tests/testqPrefUnits.cpp +++ b/tests/testqPrefUnits.cpp @@ -152,14 +152,13 @@ void TestQPrefUnits::test_multiple() // test multiple instances have the same information prefs.units.length = units::METERS; - auto tst_direct = new qPrefUnits; prefs.units.pressure = units::BAR; auto tst = qPrefUnits::instance(); - QCOMPARE(tst->length(), tst_direct->length()); + QCOMPARE(tst->length(), qPrefUnits::length()); QCOMPARE(tst->length(), units::METERS); - QCOMPARE(tst->pressure(), tst_direct->pressure()); + QCOMPARE(tst->pressure(), qPrefUnits::pressure()); QCOMPARE(tst->pressure(), units::BAR); } |