OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 #include "third_party/googletest/src/include/gtest/gtest.h" | 10 #include "third_party/googletest/src/include/gtest/gtest.h" |
11 #include "test/codec_factory.h" | 11 #include "test/codec_factory.h" |
12 #include "test/encode_test_driver.h" | 12 #include "test/encode_test_driver.h" |
13 #include "test/util.h" | 13 #include "test/util.h" |
14 #include "test/video_source.h" | 14 #include "test/video_source.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 class ConfigTest : public ::libvpx_test::EncoderTest, | 18 class ConfigTest : public ::libvpx_test::EncoderTest, |
19 public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> { | 19 public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> { |
20 protected: | 20 protected: |
21 ConfigTest() : EncoderTest(GET_PARAM(0)), | 21 ConfigTest() : EncoderTest(GET_PARAM(0)), |
22 frame_count_in_(0), frame_count_out_(0), frame_count_max_(0) {} | 22 frame_count_in_(0), frame_count_out_(0), frame_count_max_(0) {} |
| 23 virtual ~ConfigTest() {} |
23 | 24 |
24 virtual void SetUp() { | 25 virtual void SetUp() { |
25 InitializeConfig(); | 26 InitializeConfig(); |
26 SetMode(GET_PARAM(1)); | 27 SetMode(GET_PARAM(1)); |
27 } | 28 } |
28 | 29 |
29 virtual void BeginPassHook(unsigned int /*pass*/) { | 30 virtual void BeginPassHook(unsigned int /*pass*/) { |
30 frame_count_in_ = 0; | 31 frame_count_in_ = 0; |
31 frame_count_out_ = 0; | 32 frame_count_out_ = 0; |
32 } | 33 } |
(...skipping 17 matching lines...) Expand all Loading... |
50 cfg_.g_lag_in_frames = 15; | 51 cfg_.g_lag_in_frames = 15; |
51 | 52 |
52 libvpx_test::DummyVideoSource video; | 53 libvpx_test::DummyVideoSource video; |
53 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); | 54 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); |
54 | 55 |
55 EXPECT_EQ(frame_count_in_, frame_count_out_); | 56 EXPECT_EQ(frame_count_in_, frame_count_out_); |
56 } | 57 } |
57 | 58 |
58 VP8_INSTANTIATE_TEST_CASE(ConfigTest, ONE_PASS_TEST_MODES); | 59 VP8_INSTANTIATE_TEST_CASE(ConfigTest, ONE_PASS_TEST_MODES); |
59 } // namespace | 60 } // namespace |
OLD | NEW |