mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use stored SAC for validation
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
86f003b21c
commit
dbd1ee306a
1 changed files with 7 additions and 1 deletions
|
@ -371,11 +371,17 @@ int TestParse::parseCSVmanual(int units, std::string file)
|
||||||
|
|
||||||
void TestParse::exportCSVDiveDetails()
|
void TestParse::exportCSVDiveDetails()
|
||||||
{
|
{
|
||||||
|
int saved_sac;
|
||||||
|
|
||||||
parse_file(SUBSURFACE_TEST_DATA "/dives/test40.xml", &dive_table, &trip_table, &dive_site_table);
|
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("testcsvexportmanual.csv", 0, 0, "xml2manualcsv.xslt", false);
|
||||||
export_dives_xslt("testcsvexportmanualimperial.csv", 0, 1, "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();
|
clear_dive_file_data();
|
||||||
|
|
||||||
parseCSVmanual(1, "testcsvexportmanualimperial.csv");
|
parseCSVmanual(1, "testcsvexportmanualimperial.csv");
|
||||||
|
@ -383,7 +389,7 @@ void TestParse::exportCSVDiveDetails()
|
||||||
// We do not currently support reading SAC, thus faking it
|
// We do not currently support reading SAC, thus faking it
|
||||||
if (dive_table.nr > 0) {
|
if (dive_table.nr > 0) {
|
||||||
struct dive *dive = dive_table.dives[dive_table.nr - 1];
|
struct dive *dive = dive_table.dives[dive_table.nr - 1];
|
||||||
dive->sac = 1049;
|
dive->sac = saved_sac;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue