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
Showing the changes to test/invalid_file_test.cc (1 of 1 file). Show all
Unified · Split
| @@ -25,9 +25,10 @@ · 24 unmodified lines | ||
| 25 | 25 | |
| 26 | 26 | namespace { |
| 27 | 27 | |
| 28 | −using std::tr1::make_tuple; | |
| 29 | − | |
| 30 | −typedef std::tr1::tuple<int, const char *> DecodeParam; | |
| 28 | +struct DecodeParam { | |
| 29 | + int threads; | |
| 30 | + const char *filename; | |
| 31 | +}; | |
| 31 | 32 | |
| 32 | 33 | class InvalidFileTest |
| 33 | 34 | : public ::libvpx_test::DecoderTest, |
| @@ -73,8 +74,8 @@ TEST_P(InvalidFileTest, ReturnCode) { · 39 unmodified lines | ||
| 73 | 74 | libvpx_test::CompressedVideoSource *video = NULL; |
| 74 | 75 | const DecodeParam input = GET_PARAM(1); |
| 75 | 76 | vpx_codec_dec_cfg_t cfg = {0}; |
| 76 | − cfg.threads = std::tr1::get<0>(input); | |
| 77 | − const std::string filename = std::tr1::get<1>(input); | |
| 77 | + cfg.threads = input.threads; | |
| 78 | + const std::string filename = input.filename; | |
| 78 | 79 | |
| 79 | 80 | // Open compressed video file. |
| 80 | 81 | if (filename.substr(filename.length() - 3, 3) == "ivf") { |
| @@ -101,25 +102,20 @@ TEST_P(InvalidFileTest, ReturnCode) { · 20 unmodified lines | ||
| 101 | 102 | delete video; |
| 102 | 103 | } |
| 103 | 104 | |
| 104 | −const char *const kVP9InvalidFileTests[] = { | |
| 105 | − "invalid-vp90-01-v2.webm", | |
| 106 | − "invalid-vp90-02-v2.webm", | |
| 107 | − "invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.ivf", | |
| 108 | − "invalid-vp90-03-v2.webm", | |
| 109 | − "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf", | |
| 110 | − "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf", | |
| 105 | +const DecodeParam kVP9InvalidFileTests[] = { | |
| 106 | + {1, "invalid-vp90-01-v2.webm"}, | |
| 107 | + {1, "invalid-vp90-02-v2.webm"}, | |
| 108 | + {1, "invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.ivf"}, | |
| 109 | + {1, "invalid-vp90-03-v2.webm"}, | |
| 110 | + {1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf"}, | |
| 111 | + {1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf"}, | |
| 111 | 112 | }; |
| 112 | 113 | |
| 113 | −INSTANTIATE_TEST_CASE_P( | |
| 114 | − VP9, InvalidFileTest, | |
| 115 | − ::testing::Combine( | |
| 116 | − ::testing::Values( | |
| 117 | − static_cast<const libvpx_test::CodecFactory*>(&libvpx_test::kVP9)), | |
| 118 | − ::testing::Combine(::testing::Values(1), | |
| 119 | − ::testing::ValuesIn(kVP9InvalidFileTests)))); | |
| 114 | +VP9_INSTANTIATE_TEST_CASE(InvalidFileTest, | |
| 115 | + ::testing::ValuesIn(kVP9InvalidFileTests)); | |
| 120 | 116 | |
| 121 | 117 | const DecodeParam kMultiThreadedVP9InvalidFileTests[] = { |
| 122 | − make_tuple(4, "invalid-vp90-2-08-tile_1x4_frame_parallel_all_key.webm"), | |
| 118 | + {4, "invalid-vp90-2-08-tile_1x4_frame_parallel_all_key.webm"}, | |
| 123 | 119 | }; |
| 124 | 120 | |
| 125 | 121 | INSTANTIATE_TEST_CASE_P( |