1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

ts: refactor OpenCV tests

- removed tr1 usage (dropped in C++17)
- moved includes of vector/map/iostream/limits into ts.hpp
- require opencv_test + anonymous namespace (added compile check)
- fixed norm() usage (must be from cvtest::norm for checks) and other conflict functions
- added missing license headers
This commit is contained in:
Alexander Alekhin
2017-11-05 13:48:40 +00:00
parent f1e50ecab3
commit 4a297a2443
435 changed files with 2009 additions and 2378 deletions
+4 -6
View File
@@ -42,11 +42,9 @@
#include "../test_precomp.hpp"
#include "opencv2/ts/ocl_test.hpp"
#include <cmath>
#ifdef HAVE_OPENCL
namespace cvtest {
namespace opencv_test {
namespace ocl {
//////////////////////////////// LUT /////////////////////////////////////////////////
@@ -138,8 +136,8 @@ PARAM_TEST_CASE(ArithmTestBase, MatDepth, Channels, bool)
{
const int type = CV_MAKE_TYPE(depth, cn);
double minV = getMinVal(type);
double maxV = getMaxVal(type);
double minV = cvtest::getMinVal(type);
double maxV = cvtest::getMaxVal(type);
Size roiSize = randomSize(1, MAX_VALUE);
Border src1Border = randomBorder(0, use_roi ? MAX_VALUE : 0);
@@ -1964,6 +1962,6 @@ OCL_TEST(Normalize, DISABLED_regression_5876_inplace_change_type)
EXPECT_EQ(0, cvtest::norm(um, uresult, NORM_INF));
}
} } // namespace cvtest::ocl
} } // namespace opencv_test::ocl
#endif // HAVE_OPENCL