diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2018-01-06 21:16:53 +0200 |
---|---|---|
committer | mturkia <miika.turkia@gmail.com> | 2018-01-08 06:06:12 +0200 |
commit | fbbca93d53d25560711c556b6dfda3d84f28b3bd (patch) | |
tree | c1fa06beb7db5cd40b9e3abcd4fc92aad16816d8 /tests/testparse.cpp | |
parent | 62779fa453b49bd9fa9c00f77867ed0be7b27f50 (diff) | |
download | subsurface-fbbca93d53d25560711c556b6dfda3d84f28b3bd.tar.gz |
Add test for DL7 import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'tests/testparse.cpp')
-rw-r--r-- | tests/testparse.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/testparse.cpp b/tests/testparse.cpp index 49d98f66e..5e6b4cd1a 100644 --- a/tests/testparse.cpp +++ b/tests/testparse.cpp @@ -450,5 +450,62 @@ void TestParse::testExport() exportUDDF(); } +void TestParse::parseDL7() +{ + char *params[47]; + int pnr = 0; + + params[pnr++] = strdup("dateField"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("datefmt"); + params[pnr++] = intdup(0); + params[pnr++] = strdup("starttimeField"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("numberField"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("timeField"); + params[pnr++] = intdup(1); + params[pnr++] = strdup("depthField"); + params[pnr++] = intdup(2); + params[pnr++] = strdup("tempField"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("po2Field"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("o2sensor1Field"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("o2sensor2Field"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("o2sensor3Field"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("cnsField"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("ndlField"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("ttsField"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("stopdepthField"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("pressureField"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("setpointFiend"); + params[pnr++] = intdup(-1); + params[pnr++] = strdup("separatorIndex"); + params[pnr++] = intdup(3); + params[pnr++] = strdup("units"); + params[pnr++] = intdup(0); + params[pnr++] = strdup("hw"); + params[pnr++] = strdup("DL7"); + params[pnr++] = 0; + + clear_dive_file_data(); + QCOMPARE(parse_csv_file(SUBSURFACE_TEST_DATA "/dives/DL7.zxu", + params, pnr - 1 , "DL7"), 0); + QCOMPARE(dive_table.nr, 1); + + FILE_COMPARE("testuddfexport.uddf", + "testuddfexport2.uddf"); + clear_dive_file_data(); +} + QTEST_GUILESS_MAIN(TestParse) |