summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/testgitstorage.cpp1
-rw-r--r--tests/testparse.cpp1
-rw-r--r--tests/testplan.cpp21
4 files changed, 12 insertions, 15 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 23642fb3c..a31e2c6f8 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,7 +1,7 @@
# QTest based tests
macro(TEST NAME FILE)
- add_executable(${NAME} ${FILE} )
- target_link_libraries(${NAME} subsurface_corelib ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES})
+ add_executable(${NAME} ${FILE} ${SUBSURFACE_RESOURCES} )
+ target_link_libraries(${NAME} subsurface_corelib ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES} )
add_test(NAME ${NAME} COMMAND $<TARGET_FILE:${NAME}>)
endmacro()
diff --git a/tests/testgitstorage.cpp b/tests/testgitstorage.cpp
index 891982151..30417b3c4 100644
--- a/tests/testgitstorage.cpp
+++ b/tests/testgitstorage.cpp
@@ -233,6 +233,7 @@ void TestGitStorage::testGitStorageCloudMerge2()
QCOMPARE(parse_file(qPrintable(cloudTestRepo)), 0);
process_dives(false, false);
dive = get_dive(1);
+ QVERIFY(dive != NULL);
free(dive->notes);
dive->notes = strdup("These notes have been modified by TestGitStorage");
QCOMPARE(save_dives(qPrintable(cloudTestRepo)), 0);
diff --git a/tests/testparse.cpp b/tests/testparse.cpp
index 5528d0df2..8bb092b56 100644
--- a/tests/testparse.cpp
+++ b/tests/testparse.cpp
@@ -360,7 +360,6 @@ void TestParse::testParseCompareNewFormatOutput()
void TestParse::testParseDLD()
{
struct memblock mem;
- int ret, success = 0;
QString filename = SUBSURFACE_SOURCE "/dives/TestDiveDivelogsDE.DLD";
QVERIFY(readfile(filename.toLatin1().data(), &mem) > 0);
diff --git a/tests/testplan.cpp b/tests/testplan.cpp
index 2b91ab785..50966af0c 100644
--- a/tests/testplan.cpp
+++ b/tests/testplan.cpp
@@ -70,7 +70,6 @@ void setupPlanVpmb60m30minAir(struct diveplan *dp)
dp->decosac = 0;
struct gasmix bottomgas = { {210}, {0} };
- pressure_t po2 = { 1600 };
displayed_dive.cylinder[0].gasmix = bottomgas;
displayed_dive.surface_pressure.mbar = 1013;
reset_cylinders(&displayed_dive, true);
@@ -133,7 +132,6 @@ void setupPlanVpmbMultiLevelAir(struct diveplan *dp)
dp->decosac = 0;
struct gasmix bottomgas = { {210}, {0} };
- pressure_t po2 = { 1600 };
displayed_dive.cylinder[0].gasmix = bottomgas;
displayed_dive.surface_pressure.mbar = 1013;
reset_cylinders(&displayed_dive, true);
@@ -204,7 +202,6 @@ void setupPlanVpmb30m20min(struct diveplan *dp)
dp->decosac = 0;
struct gasmix bottomgas = { {210}, {0} };
- pressure_t po2 = { 1600 };
displayed_dive.cylinder[0].gasmix = bottomgas;
displayed_dive.surface_pressure.mbar = 1013;
reset_cylinders(&displayed_dive, true);
@@ -289,7 +286,7 @@ void TestPlan::testMetric()
prefs.units.length = units::METERS;
prefs.deco_mode = BUEHLMANN;
- struct diveplan testPlan = { 0 };
+ struct diveplan testPlan = {};
setupPlan(&testPlan);
plan(&testPlan, &cache, 1, 0);
@@ -325,7 +322,7 @@ void TestPlan::testImperial()
prefs.units.length = units::FEET;
prefs.deco_mode = BUEHLMANN;
- struct diveplan testPlan = { 0 };
+ struct diveplan testPlan = {};
setupPlan(&testPlan);
plan(&testPlan, &cache, 1, 0);
@@ -360,7 +357,7 @@ void TestPlan::testVpmbMetric60m30minAir()
prefs.unit_system = METRIC;
prefs.units.length = units::METERS;
- struct diveplan testPlan = { 0 };
+ struct diveplan testPlan = {};
setupPlanVpmb60m30minAir(&testPlan);
setCurrentAppState("PlanDive");
@@ -386,7 +383,7 @@ void TestPlan::testVpmbMetric60m30minEan50()
prefs.unit_system = METRIC;
prefs.units.length = units::METERS;
- struct diveplan testPlan = { 0 };
+ struct diveplan testPlan = {};
setupPlanVpmb60m30minEan50(&testPlan);
setCurrentAppState("PlanDive");
@@ -418,7 +415,7 @@ void TestPlan::testVpmbMetric60m30minTx()
prefs.unit_system = METRIC;
prefs.units.length = units::METERS;
- struct diveplan testPlan = { 0 };
+ struct diveplan testPlan = {};
setupPlanVpmb60m30minTx(&testPlan);
setCurrentAppState("PlanDive");
@@ -450,7 +447,7 @@ void TestPlan::testVpmbMetric100m60min()
prefs.unit_system = METRIC;
prefs.units.length = units::METERS;
- struct diveplan testPlan = { 0 };
+ struct diveplan testPlan = {};
setupPlanVpmb100m60min(&testPlan);
setCurrentAppState("PlanDive");
@@ -488,7 +485,7 @@ void TestPlan::testVpmbMetricMultiLevelAir()
prefs.unit_system = METRIC;
prefs.units.length = units::METERS;
- struct diveplan testPlan = { 0 };
+ struct diveplan testPlan = {};
setupPlanVpmbMultiLevelAir(&testPlan);
setCurrentAppState("PlanDive");
@@ -514,7 +511,7 @@ void TestPlan::testVpmbMetric100m10min()
prefs.unit_system = METRIC;
prefs.units.length = units::METERS;
- struct diveplan testPlan = { 0 };
+ struct diveplan testPlan = {};
setupPlanVpmb100m10min(&testPlan);
setCurrentAppState("PlanDive");
@@ -556,7 +553,7 @@ void TestPlan::testVpmbMetricRepeat()
prefs.unit_system = METRIC;
prefs.units.length = units::METERS;
- struct diveplan testPlan = { 0 };
+ struct diveplan testPlan = {};
setupPlanVpmb30m20min(&testPlan);
setCurrentAppState("PlanDive");