aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/AndroidManifest.xml17
-rw-r--r--tests/res/values/strings.xml4
-rw-r--r--tests/src/cgeo/geocaching/WaypointTest.java2
-rw-r--r--tests/src/cgeo/geocaching/cgeoApplicationTest.java3
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java1
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/GCParserTest.java2
-rw-r--r--tests/src/cgeo/geocaching/export/ExportTest.java2
-rw-r--r--tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java3
-rw-r--r--tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java10
-rw-r--r--tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java1
-rw-r--r--tests/src/cgeo/geocaching/test/RegExPerformanceTest.java3
-rw-r--r--tests/src/cgeo/geocaching/test/RegExRealPerformanceTest.java3
-rw-r--r--tests/src/cgeo/geocaching/test/WhitespaceTest.java5
-rw-r--r--tests/src/cgeo/geocaching/test/mock/GC1ZXX2.java2
-rw-r--r--tests/src/cgeo/geocaching/test/mock/GC2CJPF.java4
-rw-r--r--tests/src/cgeo/geocaching/test/mock/GC3XX5J.java2
16 files changed, 33 insertions, 31 deletions
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index 0e2bc56..1c1968b 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -4,10 +4,19 @@
android:versionCode="1"
android:versionName="1.0" >
- <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="13"/>
- <instrumentation android:targetPackage="cgeo.geocaching" android:name="com.zutubi.android.junitreport.JUnitReportTestRunner" />
- <application android:icon="@drawable/icon" android:label="@string/app_name" android:allowBackup="false">
+ <uses-sdk
+ android:minSdkVersion="4"
+ android:targetSdkVersion="13" />
- <uses-library android:name="android.test.runner" />
+ <instrumentation
+ android:name="com.zutubi.android.junitreport.JUnitReportTestRunner"
+ android:targetPackage="cgeo.geocaching" />
+
+ <application
+ android:allowBackup="false"
+ android:icon="@drawable/icon"
+ android:label="@string/app_name" >
+ <uses-library android:name="android.test.runner" />
</application>
+
</manifest> \ No newline at end of file
diff --git a/tests/res/values/strings.xml b/tests/res/values/strings.xml
index debba42..6f4b38a 100644
--- a/tests/res/values/strings.xml
+++ b/tests/res/values/strings.xml
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
+
<string name="app_name">c:geo tests</string>
-</resources>
+
+</resources> \ No newline at end of file
diff --git a/tests/src/cgeo/geocaching/WaypointTest.java b/tests/src/cgeo/geocaching/WaypointTest.java
index 974fca3..dc2853a 100644
--- a/tests/src/cgeo/geocaching/WaypointTest.java
+++ b/tests/src/cgeo/geocaching/WaypointTest.java
@@ -31,7 +31,7 @@ public class WaypointTest extends AndroidTestCase {
assertTrue(parking.compareTo(cache) < 0);
assertTrue(parking.compareTo(own) < 0);
assertTrue(parking.compareTo(trailhead) < 0);
- }
+ }
public static void testGeocode() {
final Waypoint waypoint = new Waypoint("Test waypoint", WaypointType.PARKING, false);
diff --git a/tests/src/cgeo/geocaching/cgeoApplicationTest.java b/tests/src/cgeo/geocaching/cgeoApplicationTest.java
index a877660..314c53a 100644
--- a/tests/src/cgeo/geocaching/cgeoApplicationTest.java
+++ b/tests/src/cgeo/geocaching/cgeoApplicationTest.java
@@ -191,7 +191,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
/**
* mock the "exclude disabled caches" and "exclude my caches" options for the execution of the runnable
- *
+ *
* @param runnable
*/
private static void withMockedFilters(Runnable runnable) {
@@ -415,4 +415,3 @@ public class cgeoApplicationTest extends CGeoTestCase {
}
}
-
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java b/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java
index a001f1d..94cc067 100644
--- a/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java
+++ b/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java
@@ -82,4 +82,3 @@ public class GCConnectorTest extends AbstractResourceInstrumentationTestCase {
assertEquals("GC12ABC", GCConnector.getInstance().getGeocodeFromUrl("http://coord.info/GC12ABC"));
}
}
-
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
index ff7ddff..db064b8 100644
--- a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
+++ b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
@@ -96,7 +96,7 @@ public class GCParserTest extends AbstractResourceInstrumentationTestCase {
/**
* Test {@link cgBase#parseCacheFromText(String, int, CancellableHandler)} with "mocked" data
- *
+ *
*/
@MediumTest
public static void testParseCacheFromTextWithMockedData() {
diff --git a/tests/src/cgeo/geocaching/export/ExportTest.java b/tests/src/cgeo/geocaching/export/ExportTest.java
index 5b974e0..3e5505a 100644
--- a/tests/src/cgeo/geocaching/export/ExportTest.java
+++ b/tests/src/cgeo/geocaching/export/ExportTest.java
@@ -54,7 +54,7 @@ public class ExportTest extends CGeoTestCase {
public File testExportSync(List<Geocache> caches) throws InterruptedException, ExecutionException {
final ArrayList<String> geocodes = new ArrayList<String>(caches.size());
- for (final Geocache cache: caches) {
+ for (final Geocache cache : caches) {
geocodes.add(cache.getGeocode());
}
final ExportTask task = new ExportTask(null);
diff --git a/tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java b/tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java
index 2578efa..05b4ee1 100644
--- a/tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java
+++ b/tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java
@@ -11,7 +11,8 @@ import android.widget.CheckBox;
import java.util.ArrayList;
@TargetApi(Build.VERSION_CODES.FROYO)
-@Suppress() /* This test breaks the continuous integration server, do not run it for now. */
+@Suppress()
+/* This test breaks the continuous integration server, do not run it for now. */
public class SimpleDirChooserUITest extends ActivityInstrumentationTestCase2<SimpleDirChooser> {
private Solo solo;
diff --git a/tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java b/tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java
index 52a1080..a549cf1 100644
--- a/tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java
+++ b/tests/src/cgeo/geocaching/geopoint/DistanceParserTest.java
@@ -6,7 +6,7 @@ import junit.framework.Assert;
public class DistanceParserTest extends AndroidTestCase {
- static private final double MM = 1e-6; // 1mm, in kilometers
+ static private final double MM = 1e-6; // 1mm, in kilometers
public static void testFormats() {
Assert.assertEquals(1.2, DistanceParser.parseDistance("1200 m", true), MM);
@@ -14,19 +14,19 @@ public class DistanceParserTest extends AndroidTestCase {
Assert.assertEquals(0.36576, DistanceParser.parseDistance("1200 ft", true), MM);
Assert.assertEquals(1.09728, DistanceParser.parseDistance("1200 yd", true), MM);
Assert.assertEquals(1.9312128, DistanceParser.parseDistance("1.2 mi", true), MM);
- }
+ }
public static void testImplicit() {
Assert.assertEquals(1.2, DistanceParser.parseDistance("1200", true), MM);
Assert.assertEquals(0.36576, DistanceParser.parseDistance("1200", false), MM);
- }
+ }
public static void testComma() {
Assert.assertEquals(1.2, DistanceParser.parseDistance("1,2km", true), MM);
- }
+ }
public static void testCase() {
Assert.assertEquals(0.36576, DistanceParser.parseDistance("1200 FT", true), MM);
- }
+ }
} \ No newline at end of file
diff --git a/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java b/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java
index 6b70523..2e4660b 100644
--- a/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java
+++ b/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java
@@ -31,7 +31,6 @@ public class GeoPointParserTest extends AndroidTestCase {
assertNull(point);
}
-
public static void testSouth() {
assertEquals(-refLatitude, GeopointParser.parseLatitude("S 49° 56.031"), 1e-8);
}
diff --git a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
index ec84824..d71f489 100644
--- a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
+++ b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
@@ -18,7 +18,7 @@ import junit.framework.TestCase;
* Test class to compare the performance of two regular expressions on given data.
* Can be used to improve the time needed to parse the cache data
* Run As "JUnit Test"
- *
+ *
* @author blafoo
*/
public class RegExPerformanceTest extends TestCase {
@@ -69,7 +69,6 @@ public class RegExPerformanceTest extends TestCase {
public final static Pattern PATTERN_DESCRIPTION_OLD = Pattern.compile("<span id=\"ctl00_ContentBody_LongDescription\"[^>]*>" + "(.*)</span>[^<]*</div>[^<]*<p>[^<]*</p>[^<]*<p>[^<]*<strong>\\W*Additional Hints</strong>", Pattern.CASE_INSENSITIVE);
public final static Pattern PATTERN_DESCRIPTION = Pattern.compile("<span id=\"ctl00_ContentBody_LongDescription\">(.*?)</span>[^<]*</div>[^<]*<p>[^<]*</p>[^<]*<p>[^<]*<strong>\\W*Additional Hints</strong>");
-
public final static List<MockedCache> MOCKED_CACHES;
static {
MOCKED_CACHES = Arrays.asList(new GC2CJPF(), new GC1ZXX2(), new GC2JVEH(), new GC3XX5J());
diff --git a/tests/src/cgeo/geocaching/test/RegExRealPerformanceTest.java b/tests/src/cgeo/geocaching/test/RegExRealPerformanceTest.java
index 07c4c95..1793722 100644
--- a/tests/src/cgeo/geocaching/test/RegExRealPerformanceTest.java
+++ b/tests/src/cgeo/geocaching/test/RegExRealPerformanceTest.java
@@ -1,6 +1,5 @@
package cgeo.geocaching.test;
-
import cgeo.geocaching.utils.Log;
import android.test.AndroidTestCase;
@@ -10,7 +9,7 @@ import java.util.List;
/**
* Test class to compare the performance of two regular expressions on given data.
* Can be used to improve the time needed to parse the cache data
- *
+ *
* @author blafoo
*/
public class RegExRealPerformanceTest extends AndroidTestCase {
diff --git a/tests/src/cgeo/geocaching/test/WhitespaceTest.java b/tests/src/cgeo/geocaching/test/WhitespaceTest.java
index 6138755..5e792d9 100644
--- a/tests/src/cgeo/geocaching/test/WhitespaceTest.java
+++ b/tests/src/cgeo/geocaching/test/WhitespaceTest.java
@@ -1,6 +1,5 @@
package cgeo.geocaching.test;
-
import cgeo.geocaching.utils.BaseUtils;
import cgeo.geocaching.utils.Log;
@@ -12,7 +11,7 @@ import java.util.regex.Pattern;
/**
* This test is meant for performance measurements of different whitespace replacement implementations.
* It does not test semantical correctness.
- *
+ *
*/
public class WhitespaceTest extends AbstractResourceInstrumentationTestCase {
@@ -28,7 +27,7 @@ public class WhitespaceTest extends AbstractResourceInstrumentationTestCase {
/**
* The place for the implementation to prove that the new version of replaceWhitespace is faster than
* BaseUtils.replaceWhitespace()
- *
+ *
* @param data
* @return
*/
diff --git a/tests/src/cgeo/geocaching/test/mock/GC1ZXX2.java b/tests/src/cgeo/geocaching/test/mock/GC1ZXX2.java
index d92e450..1e4b527 100644
--- a/tests/src/cgeo/geocaching/test/mock/GC1ZXX2.java
+++ b/tests/src/cgeo/geocaching/test/mock/GC1ZXX2.java
@@ -12,7 +12,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
public class GC1ZXX2 extends MockedCache {
public GC1ZXX2() {
@@ -108,7 +107,6 @@ public class GC1ZXX2 extends MockedCache {
return new MockedLazyInitializedList<String>(attributes);
}
-
@Override
public Map<LogType, Integer> getLogCounts() {
final Map<LogType, Integer> logCounts = new HashMap<LogType, Integer>();
diff --git a/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java b/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
index 107384f..8b65d43 100644
--- a/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
+++ b/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
@@ -13,7 +13,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
public class GC2CJPF extends MockedCache {
public GC2CJPF() {
@@ -39,6 +38,7 @@ public class GC2CJPF extends MockedCache {
public String getOwnerDisplayName() {
return "Tom03";
}
+
@Override
public String getOwnerUserId() {
return getOwnerDisplayName();
@@ -99,7 +99,7 @@ public class GC2CJPF extends MockedCache {
/*
* (non-Javadoc)
- *
+ *
* @see cgeo.geocaching.test.mock.MockedCache#isOwn()
*/
@Override
diff --git a/tests/src/cgeo/geocaching/test/mock/GC3XX5J.java b/tests/src/cgeo/geocaching/test/mock/GC3XX5J.java
index b598cfa..ae3c87d 100644
--- a/tests/src/cgeo/geocaching/test/mock/GC3XX5J.java
+++ b/tests/src/cgeo/geocaching/test/mock/GC3XX5J.java
@@ -12,7 +12,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
public class GC3XX5J extends MockedCache {
public GC3XX5J() {
@@ -111,7 +110,6 @@ public class GC3XX5J extends MockedCache {
return new MockedLazyInitializedList<String>(attributes);
}
-
@Override
public Map<LogType, Integer> getLogCounts() {
final Map<LogType, Integer> logCounts = new HashMap<LogType, Integer>();