aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/cgeo/geocaching/utils/ImageUtils.java8
-rw-r--r--tests/src/cgeo/geocaching/sensors/SensorsTest.java9
-rw-r--r--tests/src/cgeo/geocaching/utils/MiscUtilsTest.java7
3 files changed, 12 insertions, 12 deletions
diff --git a/main/src/cgeo/geocaching/utils/ImageUtils.java b/main/src/cgeo/geocaching/utils/ImageUtils.java
index e226703..ffb7bf3 100644
--- a/main/src/cgeo/geocaching/utils/ImageUtils.java
+++ b/main/src/cgeo/geocaching/utils/ImageUtils.java
@@ -273,9 +273,11 @@ public final class ImageUtils {
/**
* Decode a base64-encoded string and save the result into a stream.
- *
- * @param inString the encoded string
- * @param outFile the file to save the decoded result into
+ *
+ * @param inString
+ * the encoded string
+ * @param out
+ * the stream to save the decoded result into
*/
public static void decodeBase64ToStream(final String inString, final OutputStream out) throws IOException {
Base64InputStream in = null;
diff --git a/tests/src/cgeo/geocaching/sensors/SensorsTest.java b/tests/src/cgeo/geocaching/sensors/SensorsTest.java
index 87ff1de..2d75465 100644
--- a/tests/src/cgeo/geocaching/sensors/SensorsTest.java
+++ b/tests/src/cgeo/geocaching/sensors/SensorsTest.java
@@ -2,13 +2,11 @@ package cgeo.geocaching.sensors;
import cgeo.geocaching.MainActivity;
-import junit.framework.Assert;
-
import android.test.ActivityInstrumentationTestCase2;
-public class SensorsTest extends ActivityInstrumentationTestCase2<MainActivity> {
+import junit.framework.Assert;
- private MainActivity activity;
+public class SensorsTest extends ActivityInstrumentationTestCase2<MainActivity> {
public SensorsTest() {
super(MainActivity.class);
@@ -17,10 +15,9 @@ public class SensorsTest extends ActivityInstrumentationTestCase2<MainActivity>
@Override
protected void setUp() throws Exception {
super.setUp();
- activity = getActivity();
}
- public void testGetDirectionNow() {
+ public static void testGetDirectionNow() {
final float angle = DirectionProvider.getDirectionNow(1.0f);
Assert.assertTrue(angle == 1.0f || angle == 91.0f || angle == 181.0f || angle == 271.0f);
}
diff --git a/tests/src/cgeo/geocaching/utils/MiscUtilsTest.java b/tests/src/cgeo/geocaching/utils/MiscUtilsTest.java
index 2ee99c4..1a3804b 100644
--- a/tests/src/cgeo/geocaching/utils/MiscUtilsTest.java
+++ b/tests/src/cgeo/geocaching/utils/MiscUtilsTest.java
@@ -1,14 +1,15 @@
package cgeo.geocaching.utils;
-import junit.framework.TestCase;
-
import java.util.LinkedList;
import java.util.List;
+import junit.framework.TestCase;
+
public class MiscUtilsTest extends TestCase {
public static void testBufferEmpty() {
- for (final List<String> s: MiscUtils.buffer(new LinkedList<String>(), 10)) {
+ for (@SuppressWarnings("unused")
+ final List<String> s : MiscUtils.buffer(new LinkedList<String>(), 10)) {
fail("empty collection should not iterate");
}
}