diff --git a/modules/core/test/test_math.cpp b/modules/core/test/test_math.cpp index af9c85d68a..5785e8312e 100644 --- a/modules/core/test/test_math.cpp +++ b/modules/core/test/test_math.cpp @@ -2349,34 +2349,6 @@ void Core_SolvePolyTest::run( int ) template class Core_CheckRange : public testing::Test {}; -template struct depth_for_type{}; - -template<> struct depth_for_type -{ - static const int depth = CV_8U; -}; - -template<> struct depth_for_type -{ - static const int depth = CV_8S; -}; - -template<> struct depth_for_type -{ - static const int depth = CV_16U; -}; - -template<> struct depth_for_type -{ - static const int depth = CV_16S; -}; - -template<> struct depth_for_type -{ - static const int depth = CV_32S; -}; - - TYPED_TEST_CASE_P(Core_CheckRange); TYPED_TEST_P(Core_CheckRange, Negative) @@ -2385,7 +2357,7 @@ TYPED_TEST_P(Core_CheckRange, Negative) double max_bound = 16.0; TypeParam data[] = {5, 10, 15, 4, 10 ,2, 8, 12, 14}; - cv::Mat src = cv::Mat(3,3, depth_for_type::depth, data); + cv::Mat src = cv::Mat(3,3, cv::DataDepth::value, data); cv::Point* bad_pt = new cv::Point(0, 0); @@ -2402,7 +2374,7 @@ TYPED_TEST_P(Core_CheckRange, Positive) double max_bound = 16.0; TypeParam data[] = {5, 10, 15, 4, 10 ,2, 8, 12, 14}; - cv::Mat src = cv::Mat(3,3, depth_for_type::depth, data); + cv::Mat src = cv::Mat(3,3, cv::DataDepth::value, data); cv::Point* bad_pt = new cv::Point(0, 0); @@ -2419,7 +2391,7 @@ TYPED_TEST_P(Core_CheckRange, Bounds) double max_bound = 1.0; TypeParam data[] = {5, 10, 15, 4, 10 ,2, 8, 12, 14}; - cv::Mat src = cv::Mat(3,3, depth_for_type::depth, data); + cv::Mat src = cv::Mat(3,3, cv::DataDepth::value, data); cv::Point* bad_pt = new cv::Point(0, 0);