Skip to content

Commit 688aea6

Browse files
committed
videoio: naming MFX tests
1 parent 45ee8e2 commit 688aea6

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

modules/videoio/test/test_mfx.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,20 @@ TEST_P(videoio_mfx, read_write_raw)
144144
remove(filename.c_str());
145145
}
146146

147+
inline static std::string videoio_mfx_name_printer(const testing::TestParamInfo<videoio_mfx::ParamType>& info)
148+
{
149+
std::ostringstream out;
150+
const Size sz = get<0>(info.param);
151+
const std::string ext = get<2>(info.param);
152+
out << sz.width << "x" << sz.height << "x" << get<1>(info.param) << "x" << ext.substr(1, ext.size() - 1);
153+
return out.str();
154+
}
155+
147156
INSTANTIATE_TEST_CASE_P(videoio, videoio_mfx,
148157
testing::Combine(
149158
testing::Values(Size(640, 480), Size(638, 478), Size(636, 476), Size(1920, 1080)),
150159
testing::Values(1, 30, 100),
151-
testing::Values(".mpeg2", ".264", ".265")));
160+
testing::Values(".mpeg2", ".264", ".265")),
161+
videoio_mfx_name_printer);
152162

153163
}} // namespace

modules/videoio/test/test_precomp.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#ifndef __OPENCV_TEST_PRECOMP_HPP__
55
#define __OPENCV_TEST_PRECOMP_HPP__
66

7+
#include <sstream>
8+
79
#include "opencv2/ts.hpp"
810
#include "opencv2/videoio.hpp"
911
#include "opencv2/videoio/registry.hpp"

0 commit comments

Comments
 (0)