aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-10-12 09:42:03 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-10-12 09:42:03 +0200
commit51aae851f35e4bbd04cbfc898b906a27ff54c83f (patch)
tree4833ef27288214bbc20937276d98b22c045377f3 /tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java
parent986fce52206eebf856f0fe9911b15aaec5c769ac (diff)
downloadcgeo-51aae851f35e4bbd04cbfc898b906a27ff54c83f.zip
cgeo-51aae851f35e4bbd04cbfc898b906a27ff54c83f.tar.gz
cgeo-51aae851f35e4bbd04cbfc898b906a27ff54c83f.tar.bz2
fix #3321: No distance calculation and coords if cache is at equator
Diffstat (limited to 'tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java')
-rw-r--r--tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java b/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java
index 076f2c9..1de2e26 100644
--- a/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java
+++ b/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java
@@ -93,4 +93,19 @@ public class GeoPointParserTest extends AndroidTestCase {
assertEquals(refLatitude, GeopointParser.parseLatitude("N 49° 56, 031"), 1e-8);
}
+ public static void testNonTrimmed() {
+ assertEquals(refLatitude, GeopointParser.parseLatitude(" N 49° 56, 031 "), 1e-8);
+ }
+
+ public static void testEquatorGC53() {
+ assertEquals(new Geopoint(0, 36), GeopointParser.parse("00° 00.000 E 036° 00.000"));
+ }
+
+ public static void testMeridian() {
+ assertEquals(new Geopoint(123, 0), GeopointParser.parse("N 123° 00.000 00° 00.000"));
+ }
+
+ public static void testEquatorMeridian() {
+ assertEquals(new Geopoint(0, 0), GeopointParser.parse("00° 00.000 00° 00.000"));
+ }
}