Update a few tests, implement Planner

Also, fixed a typo that caused a bug.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2016-10-15 20:18:56 +02:00 committed by Dirk Hohndel
parent 8cd4255a28
commit c1fbc70d83
2 changed files with 21 additions and 23 deletions

View file

@ -2229,13 +2229,11 @@ void SettingsObjectWrapper::load()
// GeoManagement // GeoManagement
s.beginGroup("geocoding"); s.beginGroup("geocoding");
#ifdef DISABLED
GET_BOOL("enable_geocoding", geocoding.enable_geocoding); GET_BOOL("enable_geocoding", geocoding.enable_geocoding);
GET_BOOL("parse_dive_without_gps", geocoding.parse_dive_without_gps); GET_BOOL("parse_dives_without_gps", geocoding.parse_dive_without_gps);
GET_BOOL("tag_existing_dives", geocoding.tag_existing_dives); GET_BOOL("tag_existing_dives", geocoding.tag_existing_dives);
#else
prefs.geocoding.enable_geocoding = true;
#endif
GET_ENUM("cat0", taxonomy_category, geocoding.category[0]); GET_ENUM("cat0", taxonomy_category, geocoding.category[0]);
GET_ENUM("cat1", taxonomy_category, geocoding.category[1]); GET_ENUM("cat1", taxonomy_category, geocoding.category[1]);
GET_ENUM("cat2", taxonomy_category, geocoding.category[2]); GET_ENUM("cat2", taxonomy_category, geocoding.category[2]);

View file

@ -203,33 +203,33 @@ void TestPreferences::testPreferences()
TEST(tecDetails->showPicturesInProfile(), false); TEST(tecDetails->showPicturesInProfile(), false);
auto pp = pref->pp_gas; auto pp = pref->pp_gas;
pp->setShowPn2(1); pp->setShowPn2(false);
pp->setShowPhe(2); pp->setShowPhe(false);
pp->setShowPo2(3); pp->setShowPo2(false);
pp->setPo2Threshold(1.0); pp->setPo2Threshold(1.0);
pp->setPn2Threshold(2.0); pp->setPn2Threshold(2.0);
pp->setPheThreshold(3.0); pp->setPheThreshold(3.0);
TEST(pp->showPn2(), (short) 1); TEST(pp->showPn2(), (short) false);
TEST(pp->showPhe(), (short) 2); TEST(pp->showPhe(), (short) false);
TEST(pp->showPo2(), (short) 3); TEST(pp->showPo2(), (short) false);
TEST(pp->pn2Threshold(), 1.0); TEST(pp->pn2Threshold(), 2.0);
TEST(pp->pheThreshold(), 2.0); TEST(pp->pheThreshold(), 3.0);
TEST(pp->po2Threshold(), 3.0); TEST(pp->po2Threshold(), 1.0);
pp->setShowPn2(4); pp->setShowPn2(true);
pp->setShowPhe(5); pp->setShowPhe(true);
pp->setShowPo2(6); pp->setShowPo2(true);
pp->setPo2Threshold(4.0); pp->setPo2Threshold(4.0);
pp->setPn2Threshold(5.0); pp->setPn2Threshold(5.0);
pp->setPheThreshold(6.0); pp->setPheThreshold(6.0);
TEST(pp->showPn2(), (short) 4); TEST(pp->showPn2(), (short) true);
TEST(pp->showPhe(), (short) 5); TEST(pp->showPhe(), (short) true);
TEST(pp->showPo2(), (short) 6); TEST(pp->showPo2(), (short) true);
TEST(pp->pn2Threshold(), 4.0); TEST(pp->pn2Threshold(), 5.0);
TEST(pp->pheThreshold(), 5.0); TEST(pp->pheThreshold(), 6.0);
TEST(pp->po2Threshold(), 6.0); TEST(pp->po2Threshold(), 4.0);
auto fb = pref->facebook; auto fb = pref->facebook;
fb->setAccessToken("rand-access-token"); fb->setAccessToken("rand-access-token");