summaryrefslogtreecommitdiffstats
path: root/tests/testplan.cpp
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2015-08-29 12:05:39 +1000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-29 20:06:28 -0700
commit961c218c06535efd02ac5ddd5b79d03d2f924cf6 (patch)
treea57e6338784edb6fe7b1532067d1fd707805b3ad /tests/testplan.cpp
parent9770369889eb71b66667b14778cb412800ea04ca (diff)
downloadsubsurface-961c218c06535efd02ac5ddd5b79d03d2f924cf6.tar.gz
VPM-B Tests: Output first ceiling
This is useful for determining why we calculate a difference profile Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'tests/testplan.cpp')
-rw-r--r--tests/testplan.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/testplan.cpp b/tests/testplan.cpp
index b0b969128..7d5774221 100644
--- a/tests/testplan.cpp
+++ b/tests/testplan.cpp
@@ -10,6 +10,8 @@
// testing the dive plan algorithm
extern bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool show_disclaimer);
+extern pressure_t first_ceiling_pressure;
+
void setupPrefs()
{
prefs = default_prefs;
@@ -307,6 +309,8 @@ void TestPlan::testVpmbMetric60m30minAir()
save_dive(stdout, &displayed_dive);
#endif
+ // print first ceiling
+ printf("First ceiling %.1f m\n", (mbar_to_depth(first_ceiling_pressure.mbar, &displayed_dive) * 0.001));
// check expected run time of 141 minutes
QVERIFY(compareDecoTime(displayed_dive.dc.duration.seconds, 141u * 60u + 20u));
}
@@ -331,6 +335,8 @@ void TestPlan::testVpmbMetric60m30minEan50()
save_dive(stdout, &displayed_dive);
#endif
+ // print first ceiling
+ printf("First ceiling %.1f m\n", (mbar_to_depth(first_ceiling_pressure.mbar, &displayed_dive) * 0.001));
// check first gas change to EAN50 at 21m
struct event *ev = displayed_dive.dc.events;
QVERIFY(ev != NULL);
@@ -361,6 +367,8 @@ void TestPlan::testVpmbMetric60m30minTx()
save_dive(stdout, &displayed_dive);
#endif
+ // print first ceiling
+ printf("First ceiling %.1f m\n", (mbar_to_depth(first_ceiling_pressure.mbar, &displayed_dive) * 0.001));
// check first gas change to EAN50 at 21m
struct event *ev = displayed_dive.dc.events;
QVERIFY(ev != NULL);
@@ -391,6 +399,8 @@ void TestPlan::testVpmbMetric100m60min()
save_dive(stdout, &displayed_dive);
#endif
+ // print first ceiling
+ printf("First ceiling %.1f m\n", (mbar_to_depth(first_ceiling_pressure.mbar, &displayed_dive) * 0.001));
// check first gas change to EAN50 at 21m
struct event *ev = displayed_dive.dc.events;
QVERIFY(ev != NULL);
@@ -427,6 +437,8 @@ void TestPlan::testVpmbMetricMultiLevelAir()
save_dive(stdout, &displayed_dive);
#endif
+ // print first ceiling
+ printf("First ceiling %.1f m\n", (mbar_to_depth(first_ceiling_pressure.mbar, &displayed_dive) * 0.001));
// check expected run time of 167 minutes
QVERIFY(compareDecoTime(displayed_dive.dc.duration.seconds, 167u * 60u + 20u));
}
@@ -451,6 +463,8 @@ void TestPlan::testVpmbMetric100m10min()
save_dive(stdout, &displayed_dive);
#endif
+ // print first ceiling
+ printf("First ceiling %.1f m\n", (mbar_to_depth(first_ceiling_pressure.mbar, &displayed_dive) * 0.001));
// check first gas change to EAN50 at 21m
struct event *ev = displayed_dive.dc.events;
QVERIFY(ev != NULL);