mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:53:23 +00:00
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>
This commit is contained in:
parent
3b809f2cd4
commit
5d2436b504
2 changed files with 14 additions and 0 deletions
|
@ -101,6 +101,18 @@ void TestGpsCoords::testPrefixNoUnitParse()
|
|||
coord2double(48, 51.491), -coord2double(2, 17.677));
|
||||
}
|
||||
|
||||
void TestGpsCoords::testOurWeb()
|
||||
{
|
||||
testParseOK("12° 8' 0.24\" , -68° 16' 58.44\"",
|
||||
coord2double(12, 8, 0.24 ), -coord2double(68, 16, 58.44));
|
||||
}
|
||||
|
||||
void TestGpsCoords::testGoogle()
|
||||
{
|
||||
testParseOK("12.133400, -68.282900",
|
||||
coord2double(12, 8, 0.24 ), -coord2double(68, 16, 58.44));
|
||||
}
|
||||
|
||||
void TestGpsCoords::testParseOK(const QString &txt, double expectedLat,
|
||||
double expectedLon)
|
||||
{
|
||||
|
|
|
@ -22,6 +22,8 @@ private slots:
|
|||
void testNoUnitParse();
|
||||
void testNegativeXmlFormatParse();
|
||||
void testPrefixNoUnitParse();
|
||||
void testOurWeb();
|
||||
void testGoogle();
|
||||
|
||||
private:
|
||||
static void testParseOK(const QString &txt, double expectedLat,
|
||||
|
|
Loading…
Add table
Reference in a new issue