2015-02-04 08:30:24 +00:00
|
|
|
#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();
|
2015-02-23 12:38:41 +00:00
|
|
|
void testXmlFormatParse();
|
|
|
|
void testNoUnitParse();
|
|
|
|
void testNegativeXmlFormatParse();
|
|
|
|
void testPrefixNoUnitParse();
|
2015-02-04 08:30:24 +00:00
|
|
|
|
|
|
|
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
|