diff --git a/modules/java/android_test/src/org/opencv/test/OpenCVTestCase.java b/modules/java/android_test/src/org/opencv/test/OpenCVTestCase.java index 59b34edf00..102adf1958 100644 --- a/modules/java/android_test/src/org/opencv/test/OpenCVTestCase.java +++ b/modules/java/android_test/src/org/opencv/test/OpenCVTestCase.java @@ -25,10 +25,10 @@ import org.opencv.highgui.Highgui; public class OpenCVTestCase extends TestCase { - //change to 'true' to unblock fail on fail("Not yet implemented") - public static final boolean passNYI = true; - - protected static final int matSize = 10; + //change to 'true' to unblock fail on fail("Not yet implemented") + public static final boolean passNYI = true; + + protected static final int matSize = 10; protected static final double EPS = 0.001; protected static final double weakEPS = 0.5; @@ -185,11 +185,11 @@ public class OpenCVTestCase extends TestCase { } public static void fail(String msg) { - if(msg == "Not yet implemented" && passNYI) - return; - TestCase.fail(msg); + if(msg == "Not yet implemented" && passNYI) + return; + TestCase.fail(msg); } - + public static void assertListEquals(List list1, List list2) { if (list1.size() != list2.size()) { throw new UnsupportedOperationException(); @@ -220,7 +220,7 @@ public class OpenCVTestCase extends TestCase { } for (int i = 0; i < ar1.length; i++) - assertEquals(ar1[i].doubleValue(), ar2[i].doubleValue(), epsilon); + assertEquals(ar1[i].doubleValue(), ar2[i].doubleValue(), epsilon); //assertTrue(Math.abs(ar1[i].doubleValue() - ar2[i].doubleValue()) <= epsilon); } @@ -230,7 +230,7 @@ public class OpenCVTestCase extends TestCase { } for (int i = 0; i < ar1.length; i++) - assertEquals(ar1[i], ar2[i], epsilon); + assertEquals(ar1[i], ar2[i], epsilon); //assertTrue(Math.abs(ar1[i].doubleValue() - ar2[i].doubleValue()) <= epsilon); } @@ -341,9 +341,9 @@ public class OpenCVTestCase extends TestCase { } public static void assertListDMatchEquals(List expected, List actual, double epsilon) { - DMatch expectedArray[] = expected.toArray(new DMatch[0]); - DMatch actualArray[] = actual.toArray(new DMatch[0]); - assertArrayDMatchEquals(expectedArray, actualArray, epsilon); + DMatch expectedArray[] = expected.toArray(new DMatch[0]); + DMatch actualArray[] = actual.toArray(new DMatch[0]); + assertArrayDMatchEquals(expectedArray, actualArray, epsilon); } public static void assertPointEquals(Point expected, Point actual, double eps) { diff --git a/modules/java/android_test/src/org/opencv/test/OpenCVTestRunner.java b/modules/java/android_test/src/org/opencv/test/OpenCVTestRunner.java index f9a9b15fe7..3c416c5104 100644 --- a/modules/java/android_test/src/org/opencv/test/OpenCVTestRunner.java +++ b/modules/java/android_test/src/org/opencv/test/OpenCVTestRunner.java @@ -17,15 +17,15 @@ import android.util.Log; /** * This only class is Android specific. - * + * * @see OpenCV */ public class OpenCVTestRunner extends InstrumentationTestRunner { - static { System.loadLibrary("opencv_java"); } - - public static String LENA_PATH; + static { System.loadLibrary("opencv_java"); } + + public static String LENA_PATH; public static String CHESS_PATH; public static String LBPCASCADE_FRONTALFACE_PATH; public static Context context; diff --git a/modules/java/android_test/src/org/opencv/test/features2d/BruteForceDescriptorMatcherTest.java b/modules/java/android_test/src/org/opencv/test/features2d/BruteForceDescriptorMatcherTest.java index 342328e49f..3de8e46a1a 100644 --- a/modules/java/android_test/src/org/opencv/test/features2d/BruteForceDescriptorMatcherTest.java +++ b/modules/java/android_test/src/org/opencv/test/features2d/BruteForceDescriptorMatcherTest.java @@ -84,11 +84,11 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase { matSize = 100; truth = new DMatch[] { - new DMatch(0, 0, 0, 1.049694f), - new DMatch(1, 0, 0, 1.098605f), - new DMatch(2, 1, 0, 0.494587f), - new DMatch(3, 1, 0, 0.484352f), - new DMatch(4, 0, 0, 1.083795f) + new DMatch(0, 0, 0, 1.049694f), + new DMatch(1, 0, 0, 1.066820f), + new DMatch(2, 1, 0, 0.494587f), + new DMatch(3, 0, 0, 1.141826f), + new DMatch(4, 0, 0, 1.084099f) }; super.setUp(); @@ -166,7 +166,7 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase { } public void testKnnMatchMatMatListOfListOfDMatchInt() { - final int k = 3; + final int k = 3; Mat train = getTrainDescriptors(); Mat query = getQueryDescriptors(); List matches = new ArrayList(); @@ -181,12 +181,12 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase { assertEquals(query.rows(), matches.size()); for(int i = 0; i lkp = mkp.toList(); + List lkp = mkp.toList(); order(lkp); assertListKeyPointEquals(Arrays.asList(truth), lkp, EPS); }