| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 EXPECT_CALL(mock_encoder_, SampleRateHz()).WillOnce(Return(17)); | 106 EXPECT_CALL(mock_encoder_, SampleRateHz()).WillOnce(Return(17)); |
| 107 EXPECT_EQ(17, red_->SampleRateHz()); | 107 EXPECT_EQ(17, red_->SampleRateHz()); |
| 108 } | 108 } |
| 109 | 109 |
| 110 TEST_F(AudioEncoderCopyRedTest, CheckNumChannelsPropagation) { | 110 TEST_F(AudioEncoderCopyRedTest, CheckNumChannelsPropagation) { |
| 111 EXPECT_CALL(mock_encoder_, NumChannels()).WillOnce(Return(17)); | 111 EXPECT_CALL(mock_encoder_, NumChannels()).WillOnce(Return(17)); |
| 112 EXPECT_EQ(17, red_->NumChannels()); | 112 EXPECT_EQ(17, red_->NumChannels()); |
| 113 } | 113 } |
| 114 | 114 |
| 115 TEST_F(AudioEncoderCopyRedTest, CheckFrameSizePropagation) { | 115 TEST_F(AudioEncoderCopyRedTest, CheckFrameSizePropagation) { |
| 116 EXPECT_CALL(mock_encoder_, Num10MsFramesInNextPacket()).WillOnce(Return(17)); | 116 EXPECT_CALL(mock_encoder_, Num10MsFramesInNextPacket()).WillOnce(Return(17U)); |
| 117 EXPECT_EQ(17, red_->Num10MsFramesInNextPacket()); | 117 EXPECT_EQ(17U, red_->Num10MsFramesInNextPacket()); |
| 118 } | 118 } |
| 119 | 119 |
| 120 TEST_F(AudioEncoderCopyRedTest, CheckMaxFrameSizePropagation) { | 120 TEST_F(AudioEncoderCopyRedTest, CheckMaxFrameSizePropagation) { |
| 121 EXPECT_CALL(mock_encoder_, Max10MsFramesInAPacket()).WillOnce(Return(17)); | 121 EXPECT_CALL(mock_encoder_, Max10MsFramesInAPacket()).WillOnce(Return(17U)); |
| 122 EXPECT_EQ(17, red_->Max10MsFramesInAPacket()); | 122 EXPECT_EQ(17U, red_->Max10MsFramesInAPacket()); |
| 123 } | 123 } |
| 124 | 124 |
| 125 TEST_F(AudioEncoderCopyRedTest, CheckSetBitratePropagation) { | 125 TEST_F(AudioEncoderCopyRedTest, CheckSetBitratePropagation) { |
| 126 EXPECT_CALL(mock_encoder_, SetTargetBitrate(4711)); | 126 EXPECT_CALL(mock_encoder_, SetTargetBitrate(4711)); |
| 127 red_->SetTargetBitrate(4711); | 127 red_->SetTargetBitrate(4711); |
| 128 } | 128 } |
| 129 | 129 |
| 130 TEST_F(AudioEncoderCopyRedTest, CheckProjectedPacketLossRatePropagation) { | 130 TEST_F(AudioEncoderCopyRedTest, CheckProjectedPacketLossRatePropagation) { |
| 131 EXPECT_CALL(mock_encoder_, SetProjectedPacketLossRate(0.5)); | 131 EXPECT_CALL(mock_encoder_, SetProjectedPacketLossRate(0.5)); |
| 132 red_->SetProjectedPacketLossRate(0.5); | 132 red_->SetProjectedPacketLossRate(0.5); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 config.speech_encoder = NULL; | 325 config.speech_encoder = NULL; |
| 326 EXPECT_DEATH(red = new AudioEncoderCopyRed(config), | 326 EXPECT_DEATH(red = new AudioEncoderCopyRed(config), |
| 327 "Speech encoder not provided."); | 327 "Speech encoder not provided."); |
| 328 // The delete operation is needed to avoid leak reports from memcheck. | 328 // The delete operation is needed to avoid leak reports from memcheck. |
| 329 delete red; | 329 delete red; |
| 330 } | 330 } |
| 331 | 331 |
| 332 #endif // GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | 332 #endif // GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) |
| 333 | 333 |
| 334 } // namespace webrtc | 334 } // namespace webrtc |
| OLD | NEW |