From 1b37e0f1a4e4225026e7c5b2c15f178a9c75b2ad Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 30 Aug 2015 10:32:38 -0700 Subject: Add test for dive site duplication bug Signed-off-by: Dirk Hohndel --- tests/testdivesiteduplication.cpp | 11 +++++++++++ tests/testdivesiteduplication.h | 13 +++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/testdivesiteduplication.cpp create mode 100644 tests/testdivesiteduplication.h (limited to 'tests') 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 + +class TestDiveSiteDuplication : public QObject +{ + Q_OBJECT +private slots: + void testReadV2(); +}; + +#endif // TESTDIVESITEDUPLICATION_H -- cgit v1.2.3-70-g09d2