From e06c5b6fd5c9c186176263b2def0f71c18af2cfa Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 12 Nov 2012 17:47:20 +0400 Subject: [PATCH] Code review comments applied. --- .../src/org/opencv/test/OpenCVTestCase.java | 2 +- .../src/org/opencv/test/OpenCVTestRunner.java | 14 ---------- .../opencv/test/highgui/VideoCaptureTest.java | 28 +++++++++---------- 3 files changed, 15 insertions(+), 29 deletions(-) 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 f8f3c6f89..6acf0b34d 100644 --- a/modules/java/android_test/src/org/opencv/test/OpenCVTestCase.java +++ b/modules/java/android_test/src/org/opencv/test/OpenCVTestCase.java @@ -28,7 +28,7 @@ public class OpenCVTestCase extends TestCase { //change to 'true' to unblock fail on fail("Not yet implemented") public static final boolean passNYI = true; - protected static boolean isEnabled = true; + protected static boolean isTestCaseEnabled = true; protected static final int matSize = 10; protected static final double EPS = 0.001; 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 f77801211..3bd0be249 100644 --- a/modules/java/android_test/src/org/opencv/test/OpenCVTestRunner.java +++ b/modules/java/android_test/src/org/opencv/test/OpenCVTestRunner.java @@ -2,9 +2,6 @@ package org.opencv.test; import java.io.File; import java.io.IOException; -//import java.util.Iterator; - -//import junit.framework.TestCase; import junit.framework.Assert; import org.opencv.android.Utils; @@ -74,17 +71,6 @@ public class OpenCVTestRunner extends InstrumentationTestRunner { // Note: VideoCapture tests turned off by flag field in VideoCaptureTest class -// if(OpenCVTestCase.passNYI) { -// // turn off problematic camera tests -// Iterator it = androidTestRunner.getTestCases().iterator(); -// while (it.hasNext()) { -// String name = it.next().toString(); -// if (name.contains("VideoCaptureTest")) -// it.remove(); -// } -// } - - super.onStart(); } diff --git a/modules/java/android_test/src/org/opencv/test/highgui/VideoCaptureTest.java b/modules/java/android_test/src/org/opencv/test/highgui/VideoCaptureTest.java index ce210714c..903768f7b 100644 --- a/modules/java/android_test/src/org/opencv/test/highgui/VideoCaptureTest.java +++ b/modules/java/android_test/src/org/opencv/test/highgui/VideoCaptureTest.java @@ -19,13 +19,13 @@ public class VideoCaptureTest extends OpenCVTestCase { super.setUp(); capture = null; - isEnabled = false; + isTestCaseEnabled = false; isSucceed = false; isOpened = false; } public void testGet() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -39,7 +39,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testGetSupportedPreviewSizes() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -54,7 +54,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testGrab() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -64,7 +64,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testGrabFromRealCamera() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -78,7 +78,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testIsOpened() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -87,7 +87,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testIsOpenedRealCamera() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -101,7 +101,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testOpen() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -116,7 +116,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testRead() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -132,7 +132,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testRelease() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -147,7 +147,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testRetrieveMat() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -164,7 +164,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testRetrieveMatInt() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -181,7 +181,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testSet() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); } @@ -205,7 +205,7 @@ public class VideoCaptureTest extends OpenCVTestCase { } public void testVideoCaptureInt() { - if (!isEnabled) { + if (!isTestCaseEnabled) { fail("Not yet implemented"); }