diff options
Diffstat (limited to 'tests/testgpscoords.h')
-rw-r--r-- | tests/testgpscoords.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/testgpscoords.h b/tests/testgpscoords.h new file mode 100644 index 000000000..5add3da93 --- /dev/null +++ b/tests/testgpscoords.h @@ -0,0 +1,28 @@ +#ifndef TESTGPSCOORDS_H +#define TESTGPSCOORDS_H + +#include <QtTest> + +class TestGpsCoords : public QObject { +Q_OBJECT +private slots: + void testISO6709DParse(); + void testNegativeISO6709DParse(); + void testSpaceISO6709DParse(); + void testSecondsParse(); + void testSpaceSecondsParse(); + void testNegativeSecondsParse(); + void testMinutesParse(); + void testSpaceMinutesParse(); + void testMinutesInversedParse(); + void testDecimalParse(); + void testSpaceDecimalParse(); + void testDecimalInversedParse(); + +private: + static void testParseOK(const QString &txt, double expectedLat, + double expectedLon); + static double coord2double(double deg, double min = 0.0, double sec = 0.0); +}; + +#endif |