From 2c7cf52e3b18b3735865b012c3e1e1deeae22943 Mon Sep 17 00:00:00 2001 From: Seunghoon Park Date: Mon, 27 Jan 2014 20:57:40 -0500 Subject: [PATCH] fixing bug #3345. use norm to make sure two matrices are the same. (cherry picked from commit eb9d7c4dd54eea87950d98b843b349db7a95c951) --- modules/imgproc/test/test_filter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/imgproc/test/test_filter.cpp b/modules/imgproc/test/test_filter.cpp index ac678e83a6..c860a6f114 100644 --- a/modules/imgproc/test/test_filter.cpp +++ b/modules/imgproc/test/test_filter.cpp @@ -1914,5 +1914,7 @@ TEST(Imgproc_Blur, borderTypes) blur(src_roi, dst, kernelSize, Point(-1, -1), BORDER_REPLICATE); Mat expected_dst = (Mat_(3, 3) << 170, 113, 170, 113, 28, 113, 170, 113, 170); - EXPECT_EQ(9 * 255, cv::sum(expected_dst == dst).val[0]); + EXPECT_EQ(expected_dst.type(), dst.type()); + EXPECT_EQ(expected_dst.size(), dst.size()); + EXPECT_DOUBLE_EQ(0.0, cvtest::norm(expected_dst, dst, NORM_INF)); }