diff options
author | jan Iversen <jani@apache.org> | 2018-07-28 17:21:51 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-30 07:43:22 -0700 |
commit | 600da8b9ff4946d6500e2327dc8f7e361a3616cc (patch) | |
tree | 0a688b20a7941c7c61eb78388d41b85f4b1d1c0e /tests/testqPrefDiveComputer.cpp | |
parent | 311b2672da5bda0efbdda70bfe33ccc088ba5c8d (diff) | |
download | subsurface-600da8b9ff4946d6500e2327dc8f7e361a3616cc.tar.gz |
tests: correct test_multiple in all qPref classes
test_multiple did not test correctly, correct.
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests/testqPrefDiveComputer.cpp')
-rw-r--r-- | tests/testqPrefDiveComputer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/testqPrefDiveComputer.cpp b/tests/testqPrefDiveComputer.cpp index 915baecb8..5a26ffdac 100644 --- a/tests/testqPrefDiveComputer.cpp +++ b/tests/testqPrefDiveComputer.cpp @@ -110,14 +110,16 @@ void TestQPrefDiveComputer::test_struct_disk() void TestQPrefDiveComputer::test_multiple() { // test multiple instances have the same information - prefs.dive_computer.download_mode = 57; - auto tst_direct = new qPrefDiveComputer; + prefs.dive_computer.download_mode = 57; - prefs.dive_computer.download_mode = 25; auto tst = qPrefDiveComputer::instance(); + prefs.dive_computer.device = copy_qstring("mine"); + QCOMPARE(tst->device(), tst_direct->device()); + QCOMPARE(tst->device(), QString("mine")); QCOMPARE(tst->download_mode(), tst_direct->download_mode()); + QCOMPARE(tst->download_mode(), 57); } #define TEST(METHOD, VALUE) \ |