1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Merge pull request #14622 from asashour:junit

This commit is contained in:
Alexander Alekhin
2019-05-27 14:55:44 +00:00
9 changed files with 30 additions and 30 deletions
@@ -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);
@@ -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;
}