summaryrefslogtreecommitdiffstats
path: root/tests/testgpscoords.h
blob: 5add3da933a4c4e1773b87d5eed7923a789279ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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