diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2020-05-17 22:10:40 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-18 09:32:58 -0700 |
commit | dbd1ee306ac56dfead92c6d67326085c9bd09e34 (patch) | |
tree | 24b1c1009ddc6b4527a73930ba78be96bb01cc39 /tests | |
parent | 86f003b21c1cc5a26c05817fdd06f58ab3b6a3a0 (diff) | |
download | subsurface-dbd1ee306ac56dfead92c6d67326085c9bd09e34.tar.gz |
Use stored SAC for validation
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testparse.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/testparse.cpp b/tests/testparse.cpp index 36ece77f2..b722f34e5 100644 --- a/tests/testparse.cpp +++ b/tests/testparse.cpp @@ -371,11 +371,17 @@ int TestParse::parseCSVmanual(int units, std::string file) void TestParse::exportCSVDiveDetails() { + int saved_sac; + parse_file(SUBSURFACE_TEST_DATA "/dives/test40.xml", &dive_table, &trip_table, &dive_site_table); export_dives_xslt("testcsvexportmanual.csv", 0, 0, "xml2manualcsv.xslt", false); export_dives_xslt("testcsvexportmanualimperial.csv", 0, 1, "xml2manualcsv.xslt", false); + if (dive_table.nr > 0) { + struct dive *dive = dive_table.dives[dive_table.nr - 1]; + saved_sac = dive->sac; + } clear_dive_file_data(); parseCSVmanual(1, "testcsvexportmanualimperial.csv"); @@ -383,7 +389,7 @@ void TestParse::exportCSVDiveDetails() // We do not currently support reading SAC, thus faking it if (dive_table.nr > 0) { struct dive *dive = dive_table.dives[dive_table.nr - 1]; - dive->sac = 1049; + dive->sac = saved_sac; } |