aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testpreferences.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-12 21:58:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-14 09:09:06 -0700
commit691025fa2440d76e1b208a3ecd280a4aec646890 (patch)
tree6fb9cdbf743c6e6abb95c0f138530ca0e3d0cd09 /tests/testpreferences.cpp
parent4a7864444ba5c90e4113e704a593d0fc4e6207b8 (diff)
downloadsubsurface-691025fa2440d76e1b208a3ecd280a4aec646890.tar.gz
core: activate qPrefGeneral
remove General from SettingsObjectWrapper and reference qPrefGeneral update files using SettingsObjectWrapper/General to use qPrefGeneral this activated qPrefGeneral and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests/testpreferences.cpp')
-rw-r--r--tests/testpreferences.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/tests/testpreferences.cpp b/tests/testpreferences.cpp
index 41e2950d8..8f0c12f24 100644
--- a/tests/testpreferences.cpp
+++ b/tests/testpreferences.cpp
@@ -28,37 +28,37 @@ void TestPreferences::testPreferences()
general->setDefaultFilename("filename");
general->setDefaultCylinder("cylinder_2");
//TODOl: Change this to a enum. // This is 'undefined', it will need to figure out later between no_file or use_deault file.
- general->setDefaultFileBehavior(0);
- general->setDefaultSetPoint(0);
- general->setO2Consumption(0);
- general->setPscrRatio(0);
- general->setUseDefaultFile(true);
+ general->set_default_file_behavior(LOCAL_DEFAULT_FILE);
+ general->set_defaultsetpoint(0);
+ general->set_o2consumption(0);
+ general->set_pscr_ratio(0);
+ general->set_use_default_file(true);
- TEST(general->defaultFilename(), QStringLiteral("filename"));
- TEST(general->defaultCylinder(), QStringLiteral("cylinder_2"));
- TEST(general->defaultFileBehavior(), (short)LOCAL_DEFAULT_FILE); // since we have a default file, here it returns
- TEST(general->defaultSetPoint(), 0);
- TEST(general->o2Consumption(), 0);
- TEST(general->pscrRatio(), 0);
- TEST(general->useDefaultFile(), true);
+ TEST(general->default_filename(), QStringLiteral("filename"));
+ TEST(general->default_cylinder(), QStringLiteral("cylinder_2"));
+ TEST(general->default_file_behavior(), LOCAL_DEFAULT_FILE); // since we have a default file, here it returns
+ TEST(general->defaultsetpoint(), 0);
+ TEST(general->o2consumption(), 0);
+ TEST(general->pscr_ratio(), 0);
+ TEST(general->use_default_file(), true);
- general->setDefaultFilename("no_file_name");
- general->setDefaultCylinder("cylinder_1");
+ general->set_default_filename("no_file_name");
+ general->set_default_cylinder("cylinder_1");
//TODOl: Change this to a enum.
- general->setDefaultFileBehavior(CLOUD_DEFAULT_FILE);
+ general->set_default_file_behavior(CLOUD_DEFAULT_FILE);
- general->setDefaultSetPoint(1);
- general->setO2Consumption(1);
- general->setPscrRatio(1);
- general->setUseDefaultFile(false);
+ general->set_defaultsetpoint(1);
+ general->set_o2consumption(1);
+ general->set_pscr_ratio(1);
+ general->set_use_default_file(false);
- TEST(general->defaultFilename(), QStringLiteral("no_file_name"));
- TEST(general->defaultCylinder(), QStringLiteral("cylinder_1"));
- TEST(general->defaultFileBehavior(), (short)CLOUD_DEFAULT_FILE);
- TEST(general->defaultSetPoint(), 1);
- TEST(general->o2Consumption(), 1);
- TEST(general->pscrRatio(), 1);
- TEST(general->useDefaultFile(), false);
+ TEST(general->default_filename(), QStringLiteral("no_file_name"));
+ TEST(general->default_cylinder(), QStringLiteral("cylinder_1"));
+ TEST(general->default_file_behavior(), CLOUD_DEFAULT_FILE);
+ TEST(general->defaultsetpoint(), 1);
+ TEST(general->o2consumption(), 1);
+ TEST(general->pscr_ratio(), 1);
+ TEST(general->use_default_file(), false);
}
QTEST_MAIN(TestPreferences)