From 79857f1e388e2cbc35dbb51d2c554ccc0bd66304 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 7 Dec 2016 21:39:29 +0300 Subject: [PATCH] test: fix Core_ArithmMask.uninitialized test Don't run binary operations for floating-point numbers norm() will fail with NAN result. --- modules/core/test/test_arithm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/test/test_arithm.cpp b/modules/core/test/test_arithm.cpp index ab140164c8..0781fd1a3f 100644 --- a/modules/core/test/test_arithm.cpp +++ b/modules/core/test/test_arithm.cpp @@ -1496,7 +1496,7 @@ TEST(Core_ArithmMask, uninitialized) int depth = rng.uniform(CV_8U, CV_64F+1); int cn = rng.uniform(1, 6); int type = CV_MAKETYPE(depth, cn); - int op = rng.uniform(0, 5); + int op = rng.uniform(0, depth < CV_32F ? 5 : 2); // don't run binary operations between floating-point values int depth1 = op <= 1 ? CV_64F : depth; for (int k = 0; k < MAX_DIM; k++) {