From 21160137d4a8eaae0be2c2545ab7e18cd3bfc7a3 Mon Sep 17 00:00:00 2001 From: Erik Karlsson Date: Fri, 6 Mar 2015 20:44:31 +0100 Subject: [PATCH] Addition of test cases --- modules/photo/test/ocl/test_denoising.cpp | 50 ++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/modules/photo/test/ocl/test_denoising.cpp b/modules/photo/test/ocl/test_denoising.cpp index 4aba4b5..3b6998f 100644 --- a/modules/photo/test/ocl/test_denoising.cpp +++ b/modules/photo/test/ocl/test_denoising.cpp @@ -16,7 +16,7 @@ namespace ocl { PARAM_TEST_CASE(FastNlMeansDenoisingTestBase, Channels, bool, bool) { int cn, templateWindowSize, searchWindowSize; - float h; + float h[4]; bool use_roi, use_image; TEST_DECLARE_INPUT_PARAMETER(src); @@ -30,7 +30,10 @@ PARAM_TEST_CASE(FastNlMeansDenoisingTestBase, Channels, bool, bool) templateWindowSize = 7; searchWindowSize = 21; - h = 3.0f; + + ASSERT_TRUE(cn > 0 && cn <= 4); + for (int i=0; i