From e17ad1b0e03f49160d397f84bab8b9251d555d26 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 26 Nov 2017 10:48:03 +0200 Subject: Add test for DM5 import Signed-off-by: Miika Turkia --- tests/testparse.cpp | 10 ++++++++++ tests/testparse.h | 1 + 2 files changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/testparse.cpp b/tests/testparse.cpp index 47eb952ef..b614560b5 100644 --- a/tests/testparse.cpp +++ b/tests/testparse.cpp @@ -163,6 +163,16 @@ void TestParse::testParseDM4() SUBSURFACE_TEST_DATA "/dives/TestDiveDM4.xml"); } +void TestParse::testParseDM5() +{ + QCOMPARE(sqlite3_open(SUBSURFACE_TEST_DATA "/dives/TestDiveDM5.db", &_sqlite3_handle), 0); + QCOMPARE(parse_dm5_buffer(_sqlite3_handle, 0, 0, 0, &dive_table), 0); + + QCOMPARE(save_dives("./testdm5out.ssrf"), 0); + FILE_COMPARE("./testdm5out.ssrf", + SUBSURFACE_TEST_DATA "/dives/TestDiveDM5.xml"); +} + void TestParse::testParseHUDC() { char *params[37]; diff --git a/tests/testparse.h b/tests/testparse.h index 8c64c83ce..937902b18 100644 --- a/tests/testparse.h +++ b/tests/testparse.h @@ -19,6 +19,7 @@ private slots: void testParse(); void testParseDM4(); + void testParseDM5(); void testParseHUDC(); void testParseNewFormat(); void testParseDLD(); -- cgit v1.2.3-70-g09d2