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

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

Issue 2985283002: Unwrap picture ids in the RtpFrameReferencerFinder. (Closed)
Patch Set: Feedback Created 3 years, 4 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/sequence_number_util.h ('k') | webrtc/video/rtp_video_stream_receiver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/sequence_number_util_unittest.cc
diff --git a/webrtc/modules/video_coding/sequence_number_util_unittest.cc b/webrtc/modules/video_coding/sequence_number_util_unittest.cc
index e0db1a8a5fefb1bbe9b277a758a0ef15e30fed53..8555fc2da1862e973d62c661214f3558713bd006 100644
--- a/webrtc/modules/video_coding/sequence_number_util_unittest.cc
+++ b/webrtc/modules/video_coding/sequence_number_util_unittest.cc
@@ -212,7 +212,7 @@ TEST_F(TestSeqNumUtil, SeqNumComparatorWithDivisor) {
#if GTEST_HAS_DEATH_TEST
#if !defined(WEBRTC_ANDROID)
TEST(SeqNumUnwrapper, NoBackWardWrap) {
- SeqNumUnwrapper<uint8_t> unwrapper;
+ SeqNumUnwrapper<uint8_t> unwrapper(0);
EXPECT_EQ(0U, unwrapper.Unwrap(0));
// The unwrapped sequence is not allowed to wrap, if that happens the
@@ -232,13 +232,13 @@ TEST(SeqNumUnwrapper, NoForwardWrap) {
#endif
TEST(SeqNumUnwrapper, ForwardWrap) {
- SeqNumUnwrapper<uint8_t> unwrapper;
+ SeqNumUnwrapper<uint8_t> unwrapper(0);
EXPECT_EQ(0U, unwrapper.Unwrap(255));
EXPECT_EQ(1U, unwrapper.Unwrap(0));
}
TEST(SeqNumUnwrapper, ForwardWrapWithDivisor) {
- SeqNumUnwrapper<uint8_t, 33> unwrapper;
+ SeqNumUnwrapper<uint8_t, 33> unwrapper(0);
EXPECT_EQ(0U, unwrapper.Unwrap(30));
EXPECT_EQ(6U, unwrapper.Unwrap(3));
}
@@ -256,7 +256,7 @@ TEST(SeqNumUnwrapper, BackWardWrapWithDivisor) {
}
TEST(SeqNumUnwrapper, Unwrap) {
- SeqNumUnwrapper<uint16_t> unwrapper;
+ SeqNumUnwrapper<uint16_t> unwrapper(0);
const uint16_t kMax = std::numeric_limits<uint16_t>::max();
const uint16_t kMaxDist = kMax / 2 + 1;
@@ -294,7 +294,7 @@ TEST(SeqNumUnwrapper, ManyForwardWraps) {
SeqNumUnwrapper<uint16_t, kLargeNumber> unwrapper;
uint16_t next_unwrap = 0;
- uint64_t expected = 0;
+ uint64_t expected = decltype(unwrapper)::kDefaultStartValue;
for (int i = 0; i < kNumWraps * 2 + 1; ++i) {
EXPECT_EQ(expected, unwrapper.Unwrap(next_unwrap));
expected += kMaxStep;
« no previous file with comments | « webrtc/modules/video_coding/sequence_number_util.h ('k') | webrtc/video/rtp_video_stream_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698