diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java')
| -rw-r--r-- | tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java b/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java index 2e4660b..076f2c9 100644 --- a/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java +++ b/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java @@ -1,5 +1,7 @@ package cgeo.geocaching.geopoint; +import cgeo.geocaching.ui.Formatter; + import android.test.AndroidTestCase; public class GeoPointParserTest extends AndroidTestCase { @@ -49,6 +51,12 @@ public class GeoPointParserTest extends AndroidTestCase { assertTrue(goal1.isEqualTo(goal2, 1e-6)); } + public static void testParseOurOwnSeparator() { + final Geopoint separator = GeopointParser.parse("N 49° 43' 57\"" + Formatter.SEPARATOR + "E 2 12' 35"); + final Geopoint noSeparator = GeopointParser.parse("N 49 43.95 E2°12.5833333333"); + assertTrue(separator.isEqualTo(noSeparator, 1e-6)); + } + public static void testInSentence() { final Geopoint p1 = GeopointParser.parse("Station3: N51 21.523 / E07 02.680"); final Geopoint p2 = GeopointParser.parse("N51 21.523", "E07 02.680"); |
