1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +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
+5 -11
View File
@@ -3,18 +3,10 @@
// of this distribution and at http://opencv.org/license.html
#include "test_precomp.hpp"
#include "opencv2/videoio.hpp"
#include "opencv2/highgui.hpp"
#include <sstream>
#include <queue>
#include <cstdio>
#ifdef HAVE_MFX
using namespace cv;
using namespace std;
using namespace std::tr1;
namespace opencv_test { namespace {
TEST(Videoio_MFX, read_invalid)
{
@@ -71,7 +63,7 @@ const int FRAME_COUNT = 20;
inline void generateFrame(int i, Mat & frame)
{
generateFrame(i, FRAME_COUNT, frame);
::generateFrame(i, FRAME_COUNT, frame);
}
inline int fourccByExt(const String &ext)
@@ -99,7 +91,7 @@ TEST_P(Videoio_MFX, read_write_raw)
const int fourcc = fourccByExt(ext);
bool isColor = true;
queue<Mat> goodFrames;
std::queue<Mat> goodFrames;
// Write video
VideoWriter writer;
@@ -151,4 +143,6 @@ INSTANTIATE_TEST_CASE_P(videoio, Videoio_MFX,
testing::Values(1, 30, 100),
testing::Values(".mpeg2", ".264", ".265")));
}} // namespace
#endif