| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 protected: | 28 protected: |
| 29 TestVectorTest() : DecoderTest(GET_PARAM(0)), md5_file_(NULL) {} | 29 TestVectorTest() : DecoderTest(GET_PARAM(0)), md5_file_(NULL) {} |
| 30 | 30 |
| 31 virtual ~TestVectorTest() { | 31 virtual ~TestVectorTest() { |
| 32 if (md5_file_) | 32 if (md5_file_) |
| 33 fclose(md5_file_); | 33 fclose(md5_file_); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void OpenMD5File(const std::string& md5_file_name_) { | 36 void OpenMD5File(const std::string& md5_file_name_) { |
| 37 md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_); | 37 md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_); |
| 38 ASSERT_TRUE(md5_file_) << "Md5 file open failed. Filename: " | 38 ASSERT_TRUE(md5_file_ != NULL) << "Md5 file open failed. Filename: " |
| 39 << md5_file_name_; | 39 << md5_file_name_; |
| 40 } | 40 } |
| 41 | 41 |
| 42 virtual void DecompressedFrameHook(const vpx_image_t& img, | 42 virtual void DecompressedFrameHook(const vpx_image_t& img, |
| 43 const unsigned int frame_number) { | 43 const unsigned int frame_number) { |
| 44 ASSERT_TRUE(md5_file_ != NULL); | 44 ASSERT_TRUE(md5_file_ != NULL); |
| 45 char expected_md5[33]; | 45 char expected_md5[33]; |
| 46 char junk[128]; | 46 char junk[128]; |
| 47 | 47 |
| 48 // Read correct md5 checksums. | 48 // Read correct md5 checksums. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 ASSERT_NO_FATAL_FAILURE(RunLoop(video)); | 87 ASSERT_NO_FATAL_FAILURE(RunLoop(video)); |
| 88 delete video; | 88 delete video; |
| 89 } | 89 } |
| 90 | 90 |
| 91 VP8_INSTANTIATE_TEST_CASE(TestVectorTest, | 91 VP8_INSTANTIATE_TEST_CASE(TestVectorTest, |
| 92 ::testing::ValuesIn(libvpx_test::kVP8TestVectors)); | 92 ::testing::ValuesIn(libvpx_test::kVP8TestVectors)); |
| 93 VP9_INSTANTIATE_TEST_CASE(TestVectorTest, | 93 VP9_INSTANTIATE_TEST_CASE(TestVectorTest, |
| 94 ::testing::ValuesIn(libvpx_test::kVP9TestVectors)); | 94 ::testing::ValuesIn(libvpx_test::kVP9TestVectors)); |
| 95 | 95 |
| 96 } // namespace | 96 } // namespace |
| OLD | NEW |