aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/testdivesiteduplication.cpp11
-rw-r--r--tests/testdivesiteduplication.h13
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/testdivesiteduplication.cpp b/tests/testdivesiteduplication.cpp
new file mode 100644
index 000000000..fc8ba0a1e
--- /dev/null
+++ b/tests/testdivesiteduplication.cpp
@@ -0,0 +1,11 @@
+#include "testdivesiteduplication.h"
+#include "dive.h"
+#include "divesite.h"
+
+void TestDiveSiteDuplication::testReadV2()
+{
+ QCOMPARE(parse_file(SUBSURFACE_SOURCE "/dives/TwoTimesTwo.ssrf"), 0);
+ QCOMPARE(dive_site_table.nr, 2);
+}
+
+QTEST_MAIN(TestDiveSiteDuplication)
diff --git a/tests/testdivesiteduplication.h b/tests/testdivesiteduplication.h
new file mode 100644
index 000000000..5fb625568
--- /dev/null
+++ b/tests/testdivesiteduplication.h
@@ -0,0 +1,13 @@
+#ifndef TESTDIVESITEDUPLICATION_H
+#define TESTDIVESITEDUPLICATION_H
+
+#include <QTest>
+
+class TestDiveSiteDuplication : public QObject
+{
+ Q_OBJECT
+private slots:
+ void testReadV2();
+};
+
+#endif // TESTDIVESITEDUPLICATION_H