Commit 55e71a5c authored by Andrey Pavlenko's avatar Andrey Pavlenko

a couple of new smoke tests; Mat.java code clean-up

parent 322b09fc
......@@ -60,8 +60,12 @@ public class MatTest extends OpenCVTestCase {
assertEquals(CvType.CV_32F, gray0_32f.depth());
}
public void testDispose() {
fail("Not yet implemented");
public void testRelease() {
assertTrue( gray0.empty() == false );
assertTrue( gray0.rows() > 0 );
gray0.release();
assertTrue( gray0.empty() == true );
assertTrue( gray0.rows() == 0 );
}
public void testDot() {
......
......@@ -161,16 +161,31 @@ public class coreTest extends OpenCVTestCase {
Scalar color = new Scalar(128);
assertTrue(0 == Core.countNonZero(gray0));
Core.circle(gray0, center, radius, color, -1);
Core.circle(gray0, center, radius, color, -1 /*filled circle*/);
assertTrue(0 != Core.countNonZero(gray0));
}
public void testCircleMatPointIntScalarIntInt() {
fail("Not yet implemented");
Point center = new Point(gray0.cols() / 2, gray0.rows()/2);
int radius = Math.min(gray0.cols()/4, gray0.rows()/4);
Scalar color = new Scalar(128);
assertTrue(0 == Core.countNonZero(gray0));
Core.circle(gray0, center, radius, color, 2, 4/*4-connected line*/);
assertTrue(0 != Core.countNonZero(gray0));
}
public void testCircleMatPointIntScalarIntIntInt() {
fail("Not yet implemented");
Point center = new Point(gray0.cols() / 2, gray0.rows()/2);
Point center2 = new Point(gray0.cols(), gray0.rows());
int radius = Math.min(gray0.cols()/4, gray0.rows()/4);
Scalar color128 = new Scalar(128);
Scalar color0 = new Scalar(0);
assertTrue(0 == Core.countNonZero(gray0));
Core.circle(gray0, center2, radius*2, color128, 2, 4, 1/*Number of fractional bits*/);
Core.circle(gray0, center, radius, color0, 2, 4, 0);
assertTrue(0 == Core.countNonZero(gray0));
}
public void testClipLine() {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment