| Index: webrtc/modules/video_coding/codecs/test/videoprocessor_unittest.cc
|
| diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor_unittest.cc b/webrtc/modules/video_coding/codecs/test/videoprocessor_unittest.cc
|
| index 7dec809ef8bf03833a4028d2ec081d85764331ad..148d8dc74ab6b2629420e40568324604b24950a8 100644
|
| --- a/webrtc/modules/video_coding/codecs/test/videoprocessor_unittest.cc
|
| +++ b/webrtc/modules/video_coding/codecs/test/videoprocessor_unittest.cc
|
| @@ -29,7 +29,7 @@ namespace test {
|
|
|
| // Very basic testing for VideoProcessor. It's mostly tested by running the
|
| // video_quality_measurement program.
|
| -class VideoProcessorTest: public testing::Test {
|
| +class VideoProcessorTest : public testing::Test {
|
| protected:
|
| MockVideoEncoder encoder_mock_;
|
| MockVideoDecoder decoder_mock_;
|
| @@ -53,44 +53,34 @@ class VideoProcessorTest: public testing::Test {
|
| void TearDown() {}
|
|
|
| void ExpectInit() {
|
| - EXPECT_CALL(encoder_mock_, InitEncode(_, _, _))
|
| - .Times(1);
|
| + EXPECT_CALL(encoder_mock_, InitEncode(_, _, _)).Times(1);
|
| EXPECT_CALL(encoder_mock_, RegisterEncodeCompleteCallback(_))
|
| - .Times(AtLeast(1));
|
| - EXPECT_CALL(decoder_mock_, InitDecode(_, _))
|
| - .Times(1);
|
| + .Times(AtLeast(1));
|
| + EXPECT_CALL(decoder_mock_, InitDecode(_, _)).Times(1);
|
| EXPECT_CALL(decoder_mock_, RegisterDecodeCompleteCallback(_))
|
| - .Times(AtLeast(1));
|
| - EXPECT_CALL(frame_reader_mock_, NumberOfFrames())
|
| - .WillOnce(Return(1));
|
| - EXPECT_CALL(frame_reader_mock_, FrameLength())
|
| - .WillOnce(Return(152064));
|
| + .Times(AtLeast(1));
|
| + EXPECT_CALL(frame_reader_mock_, NumberOfFrames()).WillOnce(Return(1));
|
| + EXPECT_CALL(frame_reader_mock_, FrameLength()).WillOnce(Return(152064));
|
| }
|
| };
|
|
|
| TEST_F(VideoProcessorTest, Init) {
|
| ExpectInit();
|
| - VideoProcessorImpl video_processor(&encoder_mock_, &decoder_mock_,
|
| - &frame_reader_mock_,
|
| - &frame_writer_mock_,
|
| - &packet_manipulator_mock_, config_,
|
| - &stats_);
|
| + VideoProcessorImpl video_processor(
|
| + &encoder_mock_, &decoder_mock_, &frame_reader_mock_, &frame_writer_mock_,
|
| + &packet_manipulator_mock_, config_, &stats_);
|
| ASSERT_TRUE(video_processor.Init());
|
| }
|
|
|
| TEST_F(VideoProcessorTest, ProcessFrame) {
|
| ExpectInit();
|
| - EXPECT_CALL(encoder_mock_, Encode(_, _, _))
|
| - .Times(1);
|
| - EXPECT_CALL(frame_reader_mock_, ReadFrame(_))
|
| - .WillOnce(Return(true));
|
| + EXPECT_CALL(encoder_mock_, Encode(_, _, _)).Times(1);
|
| + EXPECT_CALL(frame_reader_mock_, ReadFrame(_)).WillOnce(Return(true));
|
| // Since we don't return any callback from the mock, the decoder will not
|
| // be more than initialized...
|
| - VideoProcessorImpl video_processor(&encoder_mock_, &decoder_mock_,
|
| - &frame_reader_mock_,
|
| - &frame_writer_mock_,
|
| - &packet_manipulator_mock_, config_,
|
| - &stats_);
|
| + VideoProcessorImpl video_processor(
|
| + &encoder_mock_, &decoder_mock_, &frame_reader_mock_, &frame_writer_mock_,
|
| + &packet_manipulator_mock_, config_, &stats_);
|
| ASSERT_TRUE(video_processor.Init());
|
| video_processor.ProcessFrame(0);
|
| }
|
|
|