diff --git a/modules/java/android_test/src/org/opencv/test/core/MatTest.java b/modules/java/android_test/src/org/opencv/test/core/MatTest.java index ed0623b23..a1c2a9bb6 100644 --- a/modules/java/android_test/src/org/opencv/test/core/MatTest.java +++ b/modules/java/android_test/src/org/opencv/test/core/MatTest.java @@ -708,10 +708,10 @@ public class MatTest extends OpenCVTestCase { Mat roi = rgba0.submat(3, 5, 7, 10); Mat m = roi.clone(); - assertEquals(rgba0.channels() * rgba0.cols(), roi.step1(0)); + assertTrue(rgba0.channels() * rgba0.cols() <= roi.step1(0)); assertEquals(rgba0.channels(), roi.step1(1)); - assertEquals(rgba0.channels() * (10 - 7), m.step1(0)); - assertEquals(rgba0.channels(), m.step1(1)); + assertTrue(m.channels() * (10 - 7) <= m.step1(0)); + assertEquals(m.channels(), m.step1(1)); } public void testSubmatIntIntIntInt() {