java tests fixes

This commit is contained in:
Alexander Alekhin
2016-11-22 20:08:27 +03:00
parent fe29080d59
commit 8019498c6e
4 changed files with 16 additions and 8 deletions
@@ -244,6 +244,10 @@ public class OpenCVTestCase extends TestCase {
TestCase.fail(msg);
}
public static void assertGE(double v1, double v2) {
assertTrue("Failed: " + v1 + " >= " + v2, v1 >= v2);
}
public static <E extends Number> void assertListEquals(List<E> list1, List<E> list2) {
if (list1.size() != list2.size()) {
throw new UnsupportedOperationException();
@@ -458,10 +462,10 @@ public class OpenCVTestCase extends TestCase {
if (isEqualityMeasured)
assertTrue("Max difference between expected and actiual Mats is "+ maxDiff + ", that bigger than " + eps,
Core.checkRange(diff, true, 0.0, eps));
maxDiff <= eps);
else
assertFalse("Max difference between expected and actiual Mats is "+ maxDiff + ", that less than " + eps,
Core.checkRange(diff, true, 0.0, eps));
maxDiff <= eps);
}
protected static String readFile(String path) {