diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2016-09-09 13:32:21 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-09-21 09:48:45 -0700 |
commit | ce838b998284dd67558d48e95ee3ec11655b207d (patch) | |
tree | c452f130db3a4b074b978a1641a57f0203ecfa9d /tests/testpreferences.cpp | |
parent | 41db8ea21909b5bd54cd82b4c738bf73a6a67002 (diff) | |
download | subsurface-ce838b998284dd67558d48e95ee3ec11655b207d.tar.gz |
Beginning of the DiveComputer unittests.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'tests/testpreferences.cpp')
-rw-r--r-- | tests/testpreferences.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/testpreferences.cpp b/tests/testpreferences.cpp index e71df5788..14a40cb81 100644 --- a/tests/testpreferences.cpp +++ b/tests/testpreferences.cpp @@ -73,6 +73,22 @@ void TestPreferences::testPreferences() TEST(cloud->verificationStatus(), (short)0); cloud->setVerificationStatus(1); TEST(cloud->verificationStatus(), (short)1); + + auto dc = pref->dive_computer_settings; + dc->setDevice("TomazComputer"); + TEST(dc->dc_device(), QStringLiteral("TomazComputer")); + dc->setDevice("Deepwater"); + TEST(dc->dc_device(), QStringLiteral("Deepwater")); + + dc->setDownloadMode(0); + TEST(dc->downloadMode(), 0); + dc->setDownloadMode(1); + TEST(dc->downloadMode(), 1); + + dc->setProduct("Thingy1"); + TEST(dc->dc_product(), QStringLiteral("Thingy1")); + dc->setProduct("Thingy2"); + TEST(dc->dc_product(), QStringLiteral("Thingy2")); } QTEST_MAIN(TestPreferences) |