Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Unified Diff: webrtc/modules/video_coding/video_packet_buffer_unittest.cc

Issue 2603223002: PacketBuffer now correctly cast sequence numbers to uint16_t. (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/packet_buffer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/video_packet_buffer_unittest.cc
diff --git a/webrtc/modules/video_coding/video_packet_buffer_unittest.cc b/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
index 1e2ef3ec2aca42965bd53b4f335c091b62f396ca..e2ac8be6b3cdd0d4c9e95bf218a40898be134363 100644
--- a/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
+++ b/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
@@ -102,11 +102,19 @@ TEST_F(TestPacketBuffer, InsertDuplicatePacket) {
EXPECT_TRUE(Insert(seq_num, kKeyFrame, kFirst, kLast));
}
-TEST_F(TestPacketBuffer, SeqNumWrap) {
+TEST_F(TestPacketBuffer, SeqNumWrapOneFrame) {
+ EXPECT_TRUE(Insert(0xFFFF, kKeyFrame, kFirst, kNotLast));
+ EXPECT_TRUE(Insert(0x0, kKeyFrame, kNotFirst, kLast));
+
+ CheckFrame(0xFFFF);
+}
+
+TEST_F(TestPacketBuffer, SeqNumWrapTwoFrames) {
EXPECT_TRUE(Insert(0xFFFF, kKeyFrame, kFirst, kLast));
EXPECT_TRUE(Insert(0x0, kKeyFrame, kFirst, kLast));
CheckFrame(0xFFFF);
+ CheckFrame(0x0);
}
TEST_F(TestPacketBuffer, InsertOldPackets) {
« no previous file with comments | « webrtc/modules/video_coding/packet_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698