OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 513 matching lines...) Loading... |
524 EXPECT_EQ(41248, InsertFrame(41248, 0, 1, false)); | 524 EXPECT_EQ(41248, InsertFrame(41248, 0, 1, false)); |
525 ExtractFrame(); | 525 ExtractFrame(); |
526 } | 526 } |
527 | 527 |
528 TEST_F(TestFrameBuffer2, DuplicateFrames) { | 528 TEST_F(TestFrameBuffer2, DuplicateFrames) { |
529 EXPECT_EQ(22256, InsertFrame(22256, 0, 1, false)); | 529 EXPECT_EQ(22256, InsertFrame(22256, 0, 1, false)); |
530 ExtractFrame(); | 530 ExtractFrame(); |
531 EXPECT_EQ(22256, InsertFrame(22256, 0, 1, false)); | 531 EXPECT_EQ(22256, InsertFrame(22256, 0, 1, false)); |
532 } | 532 } |
533 | 533 |
| 534 // TODO(philipel): implement more unittests related to invalid references. |
| 535 TEST_F(TestFrameBuffer2, InvalidReferences) { |
| 536 EXPECT_EQ(-1, InsertFrame(0, 0, 1000, false, 2)); |
| 537 EXPECT_EQ(1, InsertFrame(1, 0, 2000, false)); |
| 538 ExtractFrame(); |
| 539 EXPECT_EQ(2, InsertFrame(2, 0, 3000, false, 1)); |
| 540 } |
| 541 |
534 } // namespace video_coding | 542 } // namespace video_coding |
535 } // namespace webrtc | 543 } // namespace webrtc |
OLD | NEW |