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/testqPrefPartialPressureGas.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/testqPrefPartialPressureGas.cpp')
-rw-r--r-- | tests/testqPrefPartialPressureGas.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/testqPrefPartialPressureGas.cpp b/tests/testqPrefPartialPressureGas.cpp index fa68270e9..15fa478b9 100644 --- a/tests/testqPrefPartialPressureGas.cpp +++ b/tests/testqPrefPartialPressureGas.cpp @@ -131,15 +131,13 @@ void TestQPrefPartialPressureGas::test_multiple() // test multiple instances have the same information prefs.pp_graphs.phe_threshold = 2.2; - auto tst_direct = new qPrefPartialPressureGas; - prefs.pp_graphs.pn2_threshold = 2.3; auto tst = qPrefPartialPressureGas::instance(); - QCOMPARE(tst->phe_threshold(), tst_direct->phe_threshold()); - QCOMPARE(tst->pn2_threshold(), tst_direct->pn2_threshold()); - QCOMPARE(tst_direct->phe_threshold(), 2.2); - QCOMPARE(tst_direct->pn2_threshold(), 2.3); + QCOMPARE(tst->phe_threshold(), qPrefPartialPressureGas::phe_threshold()); + QCOMPARE(tst->pn2_threshold(), qPrefPartialPressureGas::pn2_threshold()); + QCOMPARE(qPrefPartialPressureGas::phe_threshold(), 2.2); + QCOMPARE(qPrefPartialPressureGas::pn2_threshold(), 2.3); } #define TEST(METHOD, VALUE) \ |