From a29ce401d5ec6f1630e3032a252e4ad213ce01f9 Mon Sep 17 00:00:00 2001 From: Alexander Shishkov Date: Thu, 18 Jul 2013 01:32:06 +0400 Subject: [PATCH] minore changes in test on HDR fromat --- modules/highgui/test/test_grfmt.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/highgui/test/test_grfmt.cpp b/modules/highgui/test/test_grfmt.cpp index 5464a9ce9c..5dae4217f0 100644 --- a/modules/highgui/test/test_grfmt.cpp +++ b/modules/highgui/test/test_grfmt.cpp @@ -338,11 +338,11 @@ TEST(Highgui_Tiff, decode_tile16384x16384) TEST(Highgui_WebP, encode_decode_lossless_webp) { cvtest::TS& ts = *cvtest::TS::ptr(); - std::string input = std::string(ts.get_data_path()) + "../cv/shared/lena.png"; + string input = string(ts.get_data_path()) + "../cv/shared/lena.png"; cv::Mat img = cv::imread(input); ASSERT_FALSE(img.empty()); - std::string output = cv::tempfile(".webp"); + string output = cv::tempfile(".webp"); EXPECT_NO_THROW(cv::imwrite(output, img)); // lossless cv::Mat img_webp = cv::imread(output); @@ -387,7 +387,7 @@ TEST(Highgui_WebP, encode_decode_lossless_webp) TEST(Highgui_WebP, encode_decode_lossy_webp) { cvtest::TS& ts = *cvtest::TS::ptr(); - std::string input = std::string(ts.get_data_path()) + "/../cv/shared/lena.png"; + string input = string(ts.get_data_path()) + "/../cv/shared/lena.png"; cv::Mat img = cv::imread(input); ASSERT_FALSE(img.empty()); @@ -407,7 +407,7 @@ TEST(Highgui_WebP, encode_decode_lossy_webp) #endif -TEST(Highgui_hdr, regression) +TEST(Highgui_Hdr, regression) { string folder = string(cvtest::TS::ptr()->get_data_path()) + "../cv/hdr/"; string name_rle = folder + "grand_canal_rle.hdr"; @@ -419,7 +419,7 @@ TEST(Highgui_hdr, regression) double min = 0.0, max = 1.0; minMaxLoc(abs(img_rle - img_no_rle), &min, &max); - ASSERT_FALSE(max > 0); + ASSERT_FALSE(max > DBL_EPSILON); string tmp_file_name = tempfile(".hdr"); vectorparam(1); for(int i = 0; i < 2; i++) { @@ -428,6 +428,6 @@ TEST(Highgui_hdr, regression) Mat written_img = imread(tmp_file_name, -1); ASSERT_FALSE(written_img.empty()) << "Could not open " << tmp_file_name; minMaxLoc(abs(img_rle - written_img), &min, &max); - ASSERT_FALSE(max > 0); + ASSERT_FALSE(max > DBL_EPSILON); } }