diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2016-11-01 12:02:36 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-11-01 09:34:47 -0700 |
commit | 49325d6c4a8a04b7a7a333e8e57555c02afe0809 (patch) | |
tree | 125463483f55647a30be2c3f4113624ddef91239 | |
parent | 92272311bfe9c60c1f77c1b47d171d885175ec3c (diff) | |
download | subsurface-49325d6c4a8a04b7a7a333e8e57555c02afe0809.tar.gz |
Preferences tests: remove comments, move code
This finishes the final round of Unittests for the Preferences
now it's time to look for things to fix.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | tests/testpreferences.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/tests/testpreferences.cpp b/tests/testpreferences.cpp index 33dfb55ef..c3de709ea 100644 --- a/tests/testpreferences.cpp +++ b/tests/testpreferences.cpp @@ -70,27 +70,6 @@ void TestPreferences::testPreferences() 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")); - - dc->setVendor("Sharewater"); - TEST(dc->dc_vendor(), QStringLiteral("Sharewater")); - dc->setVendor("OSTS"); - TEST(dc->dc_vendor(), QStringLiteral("OSTS")); - auto tecDetails = pref->techDetails; tecDetails->setModp02(0.2); TEST(tecDetails->modp02(), 0.2); @@ -568,9 +547,30 @@ void TestPreferences::testPreferences() update->setLastVersionUsed("tomaz-2"); update->setNextCheck(date); - //TEST(update->dontCheckForUpdates(), false); - //TEST(update->lastVersionUsed(), QStringLiteral("tomaz-2")); - //TEST(update->nextCheck(), date); + TEST(update->dontCheckForUpdates(), false); + TEST(update->lastVersionUsed(), QStringLiteral("tomaz-2")); + TEST(update->nextCheck(), date); + + 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")); + + dc->setVendor("Sharewater"); + TEST(dc->dc_vendor(), QStringLiteral("Sharewater")); + dc->setVendor("OSTS"); + TEST(dc->dc_vendor(), QStringLiteral("OSTS")); } QTEST_MAIN(TestPreferences) |