From 2d587ad6918659201ee528ba202cb58056d30cf8 Mon Sep 17 00:00:00 2001 From: vbystricky Date: Mon, 4 Aug 2014 15:12:36 +0400 Subject: [PATCH] Prevent generating test case with mask filled 0 only --- modules/core/test/ocl/test_arithm.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/core/test/ocl/test_arithm.cpp b/modules/core/test/ocl/test_arithm.cpp index a150782708..b0905b19f0 100644 --- a/modules/core/test/ocl/test_arithm.cpp +++ b/modules/core/test/ocl/test_arithm.cpp @@ -157,6 +157,7 @@ PARAM_TEST_CASE(ArithmTestBase, MatDepth, Channels, bool) Border maskBorder = randomBorder(0, use_roi ? MAX_VALUE : 0); randomSubMat(mask, mask_roi, roiSize, maskBorder, CV_8UC1, 0, 2); cv::threshold(mask, mask, 0.5, 255., CV_8UC1); + *mask.ptr(0) = 255; // prevent test case with mask filled 0 only val = cv::Scalar(rng.uniform(-100.0, 100.0), rng.uniform(-100.0, 100.0), rng.uniform(-100.0, 100.0), rng.uniform(-100.0, 100.0)); -- GitLab