| 
									
										
										
										
											2017-04-27 20:21:27 +02:00
										 |  |  | // SPDX-License-Identifier: GPL-2.0
 | 
					
						
							| 
									
										
										
										
											2015-02-04 09:30:24 +01:00
										 |  |  | #ifndef TESTGPSCOORDS_H
 | 
					
						
							|  |  |  | #define TESTGPSCOORDS_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QtTest>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TestGpsCoords : public QObject { | 
					
						
							| 
									
										
										
										
											2018-07-25 12:39:04 -07:00
										 |  |  | 	Q_OBJECT | 
					
						
							| 
									
										
										
										
											2015-02-04 09:30:24 +01:00
										 |  |  | 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 13:38:41 +01:00
										 |  |  | 	void testXmlFormatParse(); | 
					
						
							|  |  |  | 	void testNoUnitParse(); | 
					
						
							|  |  |  | 	void testNegativeXmlFormatParse(); | 
					
						
							|  |  |  | 	void testPrefixNoUnitParse(); | 
					
						
							| 
									
										
										
										
											2015-10-07 17:18:44 +01:00
										 |  |  | 	void testOurWeb(); | 
					
						
							|  |  |  | 	void testGoogle(); | 
					
						
							| 
									
										
										
										
											2015-02-04 09:30:24 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  | 	static void testParseOK(const QString &txt, double expectedLat, | 
					
						
							| 
									
										
										
										
											2018-07-25 12:39:04 -07:00
										 |  |  | 				double expectedLon); | 
					
						
							| 
									
										
										
										
											2015-02-04 09:30:24 +01:00
										 |  |  | 	static double coord2double(double deg, double min = 0.0, double sec = 0.0); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |