summaryrefslogtreecommitdiffstats
path: root/tests/testplannershared.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-07 14:31:49 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-20 09:55:26 -0800
commit6e065506317e2595a0df19dba147576d392c9506 (patch)
tree9061a855826df17a5acf6cb4b207c205694db7dd /tests/testplannershared.cpp
parent13b2b9f19c3f9ecb41565c5eab07d590071dede6 (diff)
downloadsubsurface-6e065506317e2595a0df19dba147576d392c9506.tar.gz
core/settings:: remove string functions for units
Remove string version of unit_system, duration_units, length, pressure, temperature, vertical_speed_time, and volume, including tests and make signals strongly typed in C++ Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'tests/testplannershared.cpp')
-rw-r--r--tests/testplannershared.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/testplannershared.cpp b/tests/testplannershared.cpp
index a0af6dc37..d9b03c247 100644
--- a/tests/testplannershared.cpp
+++ b/tests/testplannershared.cpp
@@ -61,7 +61,7 @@ void TestPlannerShared::test_rates()
{
// Set system to use meters
- qPrefUnits::set_unit_system(QStringLiteral("metric"));
+ qPrefUnits::set_unit_system(METRIC);
plannerShared::set_ascratelast6m(16);
QCOMPARE(qPrefDivePlanner::ascratelast6m(), 267);
@@ -109,7 +109,7 @@ void TestPlannerShared::test_rates()
QCOMPARE(plannerShared::descrate(), 10);
// Set system to use feet
- qPrefUnits::set_unit_system(QStringLiteral("imperial"));
+ qPrefUnits::set_unit_system(IMPERIAL);
plannerShared::set_ascratelast6m(33);
QCOMPARE(qPrefDivePlanner::ascratelast6m(), 168);
@@ -197,7 +197,7 @@ void TestPlannerShared::test_gas()
QCOMPARE(plannerShared::problemsolvingtime(), 6);
// Set system to use meters
- qPrefUnits::set_unit_system(QStringLiteral("metric"));
+ qPrefUnits::set_unit_system(METRIC);
plannerShared::set_bottomsac(30);
QCOMPARE(qPrefDivePlanner::bottomsac(), 30000);
@@ -245,7 +245,7 @@ void TestPlannerShared::test_gas()
QCOMPARE(plannerShared::bestmixend(), 10);
// Set system to use feet
- qPrefUnits::set_unit_system(QStringLiteral("imperial"));
+ qPrefUnits::set_unit_system(IMPERIAL);
plannerShared::set_bottomsac(0.9);
QCOMPARE(qPrefDivePlanner::bottomsac(), 25485);