subsurface/tests/testgpscoords.h
Dirk Hohndel 5d2436b504 Add test for more GPS coordinates
We really should be able to parse the coordinates that we show in our own
HTML export as well as the standard Google format... both have a comma
between the latitude and longitude.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-07 17:18:44 +01:00

34 lines
844 B
C++

#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();
void testXmlFormatParse();
void testNoUnitParse();
void testNegativeXmlFormatParse();
void testPrefixNoUnitParse();
void testOurWeb();
void testGoogle();
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