ref: 44eb577cf767357bb34fdf4e49461c9418271dde
parent: 6f85cc664864a8692e83734cce7b9f41a10eb180
author: James Zern <[email protected]>
date: Sat Jul 12 09:34:36 EDT 2014
invalid_file_test: convert test param from tuple to struct fixes visual studio 9 + apple clang builds where the template type is interpreted as char[] rather than const char*: ::f1_' : cannot specify explicit initializer for arrays error: array initializer must be an initializer list or string literal Change-Id: I27286ce341b2f7a09b6202caffd6b72f64fd2234
--- a/test/invalid_file_test.cc
+++ b/test/invalid_file_test.cc
@@ -25,10 +25,11 @@
namespace {
-using std::tr1::make_tuple;
+struct DecodeParam {
+ int threads;
+ const char *filename;
+};
-typedef std::tr1::tuple<int, const char *> DecodeParam;
-
class InvalidFileTest
: public ::libvpx_test::DecoderTest,
public ::libvpx_test::CodecTestWithParam<DecodeParam> {
@@ -73,8 +74,8 @@
libvpx_test::CompressedVideoSource *video = NULL;
const DecodeParam input = GET_PARAM(1);
vpx_codec_dec_cfg_t cfg = {0};
- cfg.threads = std::tr1::get<0>(input);
- const std::string filename = std::tr1::get<1>(input);
+ cfg.threads = input.threads;
+ const std::string filename = input.filename;
// Open compressed video file.
if (filename.substr(filename.length() - 3, 3) == "ivf") {
@@ -101,25 +102,20 @@
delete video;
}
-const char *const kVP9InvalidFileTests[] = {
- "invalid-vp90-01-v2.webm",
- "invalid-vp90-02-v2.webm",
- "invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.ivf",
- "invalid-vp90-03-v2.webm",
- "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf",
- "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf",
+const DecodeParam kVP9InvalidFileTests[] = {
+ {1, "invalid-vp90-01-v2.webm"},
+ {1, "invalid-vp90-02-v2.webm"},
+ {1, "invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.ivf"},
+ {1, "invalid-vp90-03-v2.webm"},
+ {1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf"},
+ {1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf"},
};
-INSTANTIATE_TEST_CASE_P(
- VP9, InvalidFileTest,
- ::testing::Combine(
- ::testing::Values(
- static_cast<const libvpx_test::CodecFactory*>(&libvpx_test::kVP9)),
- ::testing::Combine(::testing::Values(1),
- ::testing::ValuesIn(kVP9InvalidFileTests))));
+VP9_INSTANTIATE_TEST_CASE(InvalidFileTest,
+ ::testing::ValuesIn(kVP9InvalidFileTests));
const DecodeParam kMultiThreadedVP9InvalidFileTests[] = {
- make_tuple(4, "invalid-vp90-2-08-tile_1x4_frame_parallel_all_key.webm"),
+ {4, "invalid-vp90-2-08-tile_1x4_frame_parallel_all_key.webm"},
};
INSTANTIATE_TEST_CASE_P(