aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/geopoint
diff options
context:
space:
mode:
authorblafoo <github@blafoo.de>2011-12-06 23:54:37 +0100
committerblafoo <github@blafoo.de>2011-12-06 23:54:37 +0100
commitada12e248e1f94f86c39c3c7f55e37b03a97e76d (patch)
tree4d8ffda3f14d8ea40eda304802bd813d597a7d75 /tests/src/cgeo/geocaching/geopoint
parenta98fec3cb50af21d9ca64deeb43bdc9db16131c1 (diff)
downloadcgeo-ada12e248e1f94f86c39c3c7f55e37b03a97e76d.zip
cgeo-ada12e248e1f94f86c39c3c7f55e37b03a97e76d.tar.gz
cgeo-ada12e248e1f94f86c39c3c7f55e37b03a97e76d.tar.bz2
Additional testcase
Diffstat (limited to 'tests/src/cgeo/geocaching/geopoint')
-rw-r--r--tests/src/cgeo/geocaching/geopoint/GeopointTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/geopoint/GeopointTest.java b/tests/src/cgeo/geocaching/geopoint/GeopointTest.java
index e67bc99..63cc0b5 100644
--- a/tests/src/cgeo/geocaching/geopoint/GeopointTest.java
+++ b/tests/src/cgeo/geocaching/geopoint/GeopointTest.java
@@ -12,6 +12,12 @@ public class GeopointTest extends AndroidTestCase {
Assert.assertEquals(3.5, gp.getLongitude(), 1e-8);
}
+ public static void testCreationWithParsing() {
+ final Geopoint gp = new Geopoint("N 52° 25,111 E 009° 39,111");
+ Assert.assertEquals(52.41852, gp.getLatitude(), 1e-4);
+ Assert.assertEquals(9.65185, gp.getLongitude(), 1e-4);
+ }
+
public static void testCreationAtLimit() {
// No exception should be raised.
final Geopoint gp1 = new Geopoint(90.0, 10.0);