aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2015-01-27 00:22:04 +0100
committerSamuel Tardieu <sam@rfc1149.net>2015-01-27 00:22:04 +0100
commit9b02b846845885334991555b0d7ad4c811b1e264 (patch)
tree0e232d80e6d513e7c08513d5ffb636f8cecf19da /tests
parent5b13edd584f70ed5651549080437fb4fcbfd3eac (diff)
parent1481041c869097eab7899e3f898fce6e9212c1bb (diff)
downloadcgeo-9b02b846845885334991555b0d7ad4c811b1e264.zip
cgeo-9b02b846845885334991555b0d7ad4c811b1e264.tar.gz
cgeo-9b02b846845885334991555b0d7ad4c811b1e264.tar.bz2
Merge branch 'issue-4620' into upstream
Diffstat (limited to 'tests')
-rw-r--r--tests/src/cgeo/geocaching/location/GeoPointParserTest.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/src/cgeo/geocaching/location/GeoPointParserTest.java b/tests/src/cgeo/geocaching/location/GeoPointParserTest.java
index e9e002d..a2b916d 100644
--- a/tests/src/cgeo/geocaching/location/GeoPointParserTest.java
+++ b/tests/src/cgeo/geocaching/location/GeoPointParserTest.java
@@ -2,8 +2,6 @@ package cgeo.geocaching.location;
import static org.assertj.core.api.Assertions.assertThat;
-import cgeo.geocaching.location.Geopoint;
-import cgeo.geocaching.location.GeopointParser;
import cgeo.geocaching.utils.Formatter;
import android.test.AndroidTestCase;
@@ -43,6 +41,12 @@ public class GeoPointParserTest extends AndroidTestCase {
assertThat(point).isNull();
}
+ public static void testCoordinateMissingDegree() {
+ // Some home coordinates on geocaching.com lack the degree part.
+ final Geopoint point = GeopointParser.parse("N 51° 23.123' W ° 17.123");
+ assertThat(point).isEqualTo(new Geopoint("N", "51", "23", "123", "W", "0", "17", "123"));
+ }
+
public static void testSouth() {
assertEquals(-refLatitude, GeopointParser.parseLatitude("S 49° 56.031"), 1e-8);
}