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 PacketBuffer class. | 11 // Unit tests for PacketBuffer class. |
12 | 12 |
13 #include "webrtc/modules/audio_coding/neteq/packet_buffer.h" | 13 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h" |
14 | |
15 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" | |
16 #include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h" | 14 #include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h" |
17 #include "webrtc/modules/audio_coding/neteq/packet.h" | 15 #include "webrtc/modules/audio_coding/neteq/packet.h" |
| 16 #include "webrtc/modules/audio_coding/neteq/packet_buffer.h" |
18 #include "webrtc/modules/audio_coding/neteq/tick_timer.h" | 17 #include "webrtc/modules/audio_coding/neteq/tick_timer.h" |
19 #include "webrtc/test/gmock.h" | 18 #include "webrtc/test/gmock.h" |
20 #include "webrtc/test/gtest.h" | 19 #include "webrtc/test/gtest.h" |
21 | 20 |
22 using ::testing::Return; | 21 using ::testing::Return; |
23 using ::testing::_; | 22 using ::testing::_; |
24 | 23 |
25 namespace webrtc { | 24 namespace webrtc { |
26 | 25 |
27 // Helper class to generate packets. Packets must be deleted by the user. | 26 // Helper class to generate packets. Packets must be deleted by the user. |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 // Test the IsObsoleteTimestamp method with different limit timestamps. | 658 // Test the IsObsoleteTimestamp method with different limit timestamps. |
660 TEST(PacketBuffer, IsObsoleteTimestamp) { | 659 TEST(PacketBuffer, IsObsoleteTimestamp) { |
661 TestIsObsoleteTimestamp(0); | 660 TestIsObsoleteTimestamp(0); |
662 TestIsObsoleteTimestamp(1); | 661 TestIsObsoleteTimestamp(1); |
663 TestIsObsoleteTimestamp(0xFFFFFFFF); // -1 in uint32_t. | 662 TestIsObsoleteTimestamp(0xFFFFFFFF); // -1 in uint32_t. |
664 TestIsObsoleteTimestamp(0x80000000); // 2^31. | 663 TestIsObsoleteTimestamp(0x80000000); // 2^31. |
665 TestIsObsoleteTimestamp(0x80000001); // 2^31 + 1. | 664 TestIsObsoleteTimestamp(0x80000001); // 2^31 + 1. |
666 TestIsObsoleteTimestamp(0x7FFFFFFF); // 2^31 - 1. | 665 TestIsObsoleteTimestamp(0x7FFFFFFF); // 2^31 - 1. |
667 } | 666 } |
668 } // namespace webrtc | 667 } // namespace webrtc |
OLD | NEW |