From 4423a5edada0accf4bac71d76365feab8aeb1df6 Mon Sep 17 00:00:00 2001 From: Tomoaki Teshima Date: Sat, 23 Jul 2016 23:11:57 +0900 Subject: [PATCH] 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));