diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2012-01-04 08:01:58 +0100 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2012-01-04 08:01:58 +0100 |
commit | c66ef03eab92c1e386e0a6bcc6de0eb8fb586760 (patch) | |
tree | f105aa2bebd5ee518bd187c502968969805afa57 /tests/src/cgeo/geocaching/geopoint | |
parent | 15f068b9a89d63d75e09dc60302b6242d5724613 (diff) | |
download | cgeo-c66ef03eab92c1e386e0a6bcc6de0eb8fb586760.zip cgeo-c66ef03eab92c1e386e0a6bcc6de0eb8fb586760.tar.gz cgeo-c66ef03eab92c1e386e0a6bcc6de0eb8fb586760.tar.bz2 |
#936: improve stability, have unit test
Diffstat (limited to 'tests/src/cgeo/geocaching/geopoint')
-rw-r--r-- | tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java b/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java index b6d7c66..661623e 100644 --- a/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java +++ b/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java @@ -23,7 +23,7 @@ public class GeoPointParserTest extends AndroidTestCase { } public static void testCoordinateMissingPart() { - // we are trying to parse a _point_, but have only one a latitude. Don't accept the numerical part as longitude! + // we are trying to parse a _point_, but have only a latitude. Don't accept the numerical part as longitude! Geopoint point = null; try { point = GeopointParser.parse("N 49° 56.031"); @@ -69,4 +69,14 @@ public class GeoPointParserTest extends AndroidTestCase { } assertEquals(null, point); } + + public static void testComma() { + final Geopoint pointComma = GeopointParser.parse("N 46° 27' 55,65''\n" + + "E 15° 53' 41,68''"); + final Geopoint pointDot = GeopointParser.parse("N 46° 27' 55.65''\n" + + "E 15° 53' 41.68''"); + assertNotNull(pointComma); + assertNotNull(pointDot); + assertTrue(pointComma.isEqualTo(pointDot)); + } } |