aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java')
-rw-r--r--tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java b/tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java
index 3e8336b..357d34c 100644
--- a/tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java
+++ b/tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java
@@ -6,12 +6,11 @@ import android.test.AndroidTestCase;
import junit.framework.Assert;
-@SuppressWarnings("static-method")
public class DistanceParserTest extends AndroidTestCase {
static private final double MM = 1e-6; // 1mm, in kilometers
- public void testFormats() {
+ public static void testFormats() {
Assert.assertEquals(1.2, DistanceParser.parseDistance("1200 m", true), MM);
Assert.assertEquals(1.2, DistanceParser.parseDistance("1.2 km", true), MM);
Assert.assertEquals(0.36576, DistanceParser.parseDistance("1200 ft", true), MM);
@@ -19,16 +18,16 @@ public class DistanceParserTest extends AndroidTestCase {
Assert.assertEquals(1.9312128, DistanceParser.parseDistance("1.2 mi", true), MM);
}
- public void testImplicit() {
+ public static void testImplicit() {
Assert.assertEquals(1.2, DistanceParser.parseDistance("1200", true), MM);
Assert.assertEquals(0.36576, DistanceParser.parseDistance("1200", false), MM);
}
- public void testComma() {
+ public static void testComma() {
Assert.assertEquals(1.2, DistanceParser.parseDistance("1,2km", true), MM);
}
- public void testCase() {
+ public static void testCase() {
Assert.assertEquals(0.36576, DistanceParser.parseDistance("1200 FT", true), MM);
}