Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -581,7 +581,7 @@ public class OpenCVTestCase extends TestCase {
|
||||
message = TAG + " :: " + "could not instantiate " + cname + "! Exception: " + ex.getMessage();
|
||||
}
|
||||
|
||||
assertTrue(message, instance!=null);
|
||||
assertNotNull(message, instance);
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class OpenCVTestRunner extends InstrumentationTestRunner {
|
||||
}
|
||||
|
||||
context = getContext();
|
||||
Assert.assertTrue("Context can't be 'null'", context != null);
|
||||
Assert.assertNotNull("Context can't be 'null'", context);
|
||||
LENA_PATH = Utils.exportResource(context, R.drawable.lena);
|
||||
CHESS_PATH = Utils.exportResource(context, R.drawable.chessboard);
|
||||
LBPCASCADE_FRONTALFACE_PATH = Utils.exportResource(context, R.raw.lbpcascade_frontalface);
|
||||
|
||||
@@ -74,7 +74,7 @@ public class UtilsTest extends OpenCVTestCase {
|
||||
// RGBA
|
||||
Mat imgRGBA = new Mat();
|
||||
Imgproc.cvtColor(imgBGR, imgRGBA, Imgproc.COLOR_BGR2RGBA);
|
||||
assertTrue(!imgRGBA.empty() && imgRGBA.channels() == 4);
|
||||
assertFalse(imgRGBA.empty() && imgRGBA.channels() == 4);
|
||||
|
||||
bmp16.eraseColor(Color.BLACK); m16.setTo(s0);
|
||||
Utils.matToBitmap(imgRGBA, bmp16); Utils.bitmapToMat(bmp16, m16);
|
||||
@@ -92,7 +92,7 @@ public class UtilsTest extends OpenCVTestCase {
|
||||
// RGB
|
||||
Mat imgRGB = new Mat();
|
||||
Imgproc.cvtColor(imgBGR, imgRGB, Imgproc.COLOR_BGR2RGB);
|
||||
assertTrue(!imgRGB.empty() && imgRGB.channels() == 3);
|
||||
assertFalse(imgRGB.empty() && imgRGB.channels() == 3);
|
||||
|
||||
bmp16.eraseColor(Color.BLACK); m16.setTo(s0);
|
||||
Utils.matToBitmap(imgRGB, bmp16); Utils.bitmapToMat(bmp16, m16);
|
||||
@@ -110,7 +110,7 @@ public class UtilsTest extends OpenCVTestCase {
|
||||
// Gray
|
||||
Mat imgGray = new Mat();
|
||||
Imgproc.cvtColor(imgBGR, imgGray, Imgproc.COLOR_BGR2GRAY);
|
||||
assertTrue(!imgGray.empty() && imgGray.channels() == 1);
|
||||
assertFalse(imgGray.empty() && imgGray.channels() == 1);
|
||||
Mat tmp = new Mat();
|
||||
|
||||
bmp16.eraseColor(Color.BLACK); m16.setTo(s0);
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
<property name="test.dir" value="testResults"/>
|
||||
<property name="build.dir" value="build"/>
|
||||
|
||||
<property name="opencv.test.package" value="*"/>
|
||||
<property name="opencv.test.class" value="*"/>
|
||||
|
||||
<path id="master-classpath">
|
||||
<fileset dir="lib">
|
||||
<include name="*.jar"/>
|
||||
@@ -21,7 +24,7 @@
|
||||
<target name="compile">
|
||||
<mkdir dir="build/classes"/>
|
||||
|
||||
<javac sourcepath="" srcdir="src" destdir="build/classes" includeantruntime="false" >
|
||||
<javac sourcepath="" srcdir="src" destdir="build/classes" debug="on" includeantruntime="false" >
|
||||
<include name="**/*.java"/>
|
||||
<classpath refid="master-classpath"/>
|
||||
</javac>
|
||||
@@ -38,7 +41,7 @@
|
||||
|
||||
<target name="test" depends="jar">
|
||||
<mkdir dir="${test.dir}"/>
|
||||
<junit printsummary="true" haltonfailure="false" haltonerror="false" showoutput="true" logfailedtests="true" maxmemory="256m">
|
||||
<junit printsummary="withOutAndErr" haltonfailure="false" haltonerror="false" showoutput="true" logfailedtests="true" maxmemory="256m">
|
||||
<sysproperty key="java.library.path" path="${opencv.lib.path}"/>
|
||||
<env key="PATH" path="${opencv.lib.path}:${env.PATH}:${env.Path}"/>
|
||||
<env key="DYLD_LIBRARY_PATH" path="${env.OPENCV_SAVED_DYLD_LIBRARY_PATH}"/> <!-- https://github.com/opencv/opencv/issues/14353 -->
|
||||
@@ -50,7 +53,7 @@
|
||||
<formatter type="xml"/>
|
||||
|
||||
<batchtest fork="yes" todir="${test.dir}">
|
||||
<zipfileset src="build/jar/opencv-test.jar" includes="**/*.class" excludes="**/OpenCVTest*">
|
||||
<zipfileset src="build/jar/opencv-test.jar" includes="**/${opencv.test.package}/${opencv.test.class}.class" excludes="**/OpenCVTest*">
|
||||
<exclude name="**/*$*.class"/>
|
||||
</zipfileset>
|
||||
</batchtest>
|
||||
|
||||
@@ -607,7 +607,7 @@ public class OpenCVTestCase extends TestCase {
|
||||
message = TAG + " :: " + "could not instantiate " + cname + "! Exception: " + ex.getMessage();
|
||||
}
|
||||
|
||||
assertTrue(message, instance!=null);
|
||||
assertNotNull(message, instance);
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user