From 961c218c06535efd02ac5ddd5b79d03d2f924cf6 Mon Sep 17 00:00:00 2001 From: Rick Walsh Date: Sat, 29 Aug 2015 12:05:39 +1000 Subject: VPM-B Tests: Output first ceiling This is useful for determining why we calculate a difference profile Signed-off-by: Rick Walsh Signed-off-by: Dirk Hohndel --- tests/testplan.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') 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); -- cgit v1.2.3-70-g09d2