| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
| 11 // Unit tests for DelayManager class. | 11 // Unit tests for DelayManager class. |
| 12 | 12 |
| 13 #include "webrtc/modules/audio_coding/neteq/delay_manager.h" | 13 #include "webrtc/modules/audio_coding/neteq/delay_manager.h" |
| 14 | 14 |
| 15 #include <math.h> | 15 #include <math.h> |
| 16 | 16 |
| 17 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "webrtc/test/gmock.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "webrtc/test/gtest.h" |
| 19 #include "webrtc/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h" | 19 #include "webrtc/modules/audio_coding/neteq/mock/mock_delay_peak_detector.h" |
| 20 | 20 |
| 21 namespace webrtc { | 21 namespace webrtc { |
| 22 | 22 |
| 23 using ::testing::Return; | 23 using ::testing::Return; |
| 24 using ::testing::_; | 24 using ::testing::_; |
| 25 | 25 |
| 26 class DelayManagerTest : public ::testing::Test { | 26 class DelayManagerTest : public ::testing::Test { |
| 27 protected: | 27 protected: |
| 28 static const int kMaxNumberOfPackets = 240; | 28 static const int kMaxNumberOfPackets = 240; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 EXPECT_TRUE(dm_->SetMaximumDelay(10)); | 277 EXPECT_TRUE(dm_->SetMaximumDelay(10)); |
| 278 EXPECT_FALSE(dm_->SetMinimumDelay(20)); | 278 EXPECT_FALSE(dm_->SetMinimumDelay(20)); |
| 279 | 279 |
| 280 // Maximum delay less than minimum delay is not accepted. | 280 // Maximum delay less than minimum delay is not accepted. |
| 281 EXPECT_TRUE(dm_->SetMaximumDelay(100)); | 281 EXPECT_TRUE(dm_->SetMaximumDelay(100)); |
| 282 EXPECT_TRUE(dm_->SetMinimumDelay(80)); | 282 EXPECT_TRUE(dm_->SetMinimumDelay(80)); |
| 283 EXPECT_FALSE(dm_->SetMaximumDelay(60)); | 283 EXPECT_FALSE(dm_->SetMaximumDelay(60)); |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace webrtc | 286 } // namespace webrtc |
| OLD | NEW |