mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Beginning of the DiveComputer unittests.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
41db8ea219
commit
ce838b9982
1 changed files with 16 additions and 0 deletions
|
@ -73,6 +73,22 @@ void TestPreferences::testPreferences()
|
||||||
TEST(cloud->verificationStatus(), (short)0);
|
TEST(cloud->verificationStatus(), (short)0);
|
||||||
cloud->setVerificationStatus(1);
|
cloud->setVerificationStatus(1);
|
||||||
TEST(cloud->verificationStatus(), (short)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)
|
QTEST_MAIN(TestPreferences)
|
||||||
|
|
Loading…
Add table
Reference in a new issue