From 4423a5edada0accf4bac71d76365feab8aeb1df6 Mon Sep 17 00:00:00 2001 From: Tomoaki Teshima Date: Sat, 23 Jul 2016 23:11:57 +0900 Subject: [PATCH 1/2] fix build error * NAN is not defined on some platform --- modules/core/test/test_arithm.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/core/test/test_arithm.cpp b/modules/core/test/test_arithm.cpp index 1289b73e3..f946b7b8b 100644 --- a/modules/core/test/test_arithm.cpp +++ b/modules/core/test/test_arithm.cpp @@ -1902,6 +1902,11 @@ TEST(Normalize, regression_5876_inplace_change_type) EXPECT_EQ(0, cvtest::norm(m, result, NORM_INF)); } +#ifndef NAN +#include // numeric_limits::quiet_NaN() +#define NAN std::numeric_limits::quiet_NaN() +#endif + TEST(MinMaxLoc, regression_4955_nans) { cv::Mat one_mat(2, 2, CV_32F, cv::Scalar(1)); From 70dcd107d08a2e6bf80a4b625c12df7533b8d211 Mon Sep 17 00:00:00 2001 From: Tomoaki Teshima Date: Sun, 24 Jul 2016 23:34:12 +0900 Subject: [PATCH 2/2] follow the comment * test build on VS2012 --- modules/core/test/test_arithm.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/core/test/test_arithm.cpp b/modules/core/test/test_arithm.cpp index f946b7b8b..68aa09b0e 100644 --- a/modules/core/test/test_arithm.cpp +++ b/modules/core/test/test_arithm.cpp @@ -1,4 +1,5 @@ #include "test_precomp.hpp" +#include using namespace cv; using namespace std; @@ -1902,11 +1903,6 @@ TEST(Normalize, regression_5876_inplace_change_type) EXPECT_EQ(0, cvtest::norm(m, result, NORM_INF)); } -#ifndef NAN -#include // numeric_limits::quiet_NaN() -#define NAN std::numeric_limits::quiet_NaN() -#endif - TEST(MinMaxLoc, regression_4955_nans) { cv::Mat one_mat(2, 2, CV_32F, cv::Scalar(1));