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

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter_unittest.cc

Issue 2990163002: Almost full implementation of BBR's core. (Closed)
Patch Set: fixed patch failure 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
Index: webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter_unittest.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter_unittest.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter_unittest.cc
index 7f97f2a33d476a543d5fadcef71a630371f431d3..6c13fd1b519b05df134af005fea0a99ff403594a 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter_unittest.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/max_bandwidth_filter_unittest.cc
@@ -22,61 +22,61 @@ TEST(MaxBandwidthFilterTest, InitializationCheck) {
TEST(MaxBandwidthFilterTest, AddOneBandwidthSample) {
MaxBandwidthFilter max_bandwidth_filter;
- max_bandwidth_filter.AddBandwidthSample(13, 4, 10);
+ max_bandwidth_filter.AddBandwidthSample(13, 4);
EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bps(), 13);
}
TEST(MaxBandwidthFilterTest, AddSeveralBandwidthSamples) {
MaxBandwidthFilter max_bandwidth_filter;
- max_bandwidth_filter.AddBandwidthSample(10, 5, 10);
- max_bandwidth_filter.AddBandwidthSample(13, 6, 10);
+ max_bandwidth_filter.AddBandwidthSample(10, 5);
+ max_bandwidth_filter.AddBandwidthSample(13, 6);
EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bps(), 13);
}
TEST(MaxBandwidthFilterTest, FirstSampleTimeOut) {
MaxBandwidthFilter max_bandwidth_filter;
- max_bandwidth_filter.AddBandwidthSample(13, 5, 10);
- max_bandwidth_filter.AddBandwidthSample(10, 15, 10);
+ max_bandwidth_filter.AddBandwidthSample(13, 5);
+ max_bandwidth_filter.AddBandwidthSample(10, 15);
EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bps(), 10);
}
TEST(MaxBandwidthFilterTest, SecondSampleBecomesTheFirst) {
MaxBandwidthFilter max_bandwidth_filter;
- max_bandwidth_filter.AddBandwidthSample(4, 5, 10);
- max_bandwidth_filter.AddBandwidthSample(3, 10, 10);
- max_bandwidth_filter.AddBandwidthSample(2, 15, 10);
+ max_bandwidth_filter.AddBandwidthSample(4, 5);
+ max_bandwidth_filter.AddBandwidthSample(3, 10);
+ max_bandwidth_filter.AddBandwidthSample(2, 15);
EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bps(), 3);
}
TEST(MaxBandwidthFilterTest, ThirdSampleBecomesTheFirst) {
MaxBandwidthFilter max_bandwidth_filter;
- max_bandwidth_filter.AddBandwidthSample(4, 5, 10);
- max_bandwidth_filter.AddBandwidthSample(3, 10, 10);
- max_bandwidth_filter.AddBandwidthSample(2, 25, 10);
+ max_bandwidth_filter.AddBandwidthSample(4, 5);
+ max_bandwidth_filter.AddBandwidthSample(3, 10);
+ max_bandwidth_filter.AddBandwidthSample(2, 25);
EXPECT_EQ(max_bandwidth_filter.max_bandwidth_estimate_bps(), 2);
}
TEST(MaxBandwidthFilterTest, FullBandwidthReached) {
MaxBandwidthFilter max_bandwidth_filter;
- max_bandwidth_filter.AddBandwidthSample(100, 1, 10);
+ max_bandwidth_filter.AddBandwidthSample(100, 1);
EXPECT_EQ(max_bandwidth_filter.FullBandwidthReached(1.25f, 3), false);
- max_bandwidth_filter.AddBandwidthSample(110, 2, 10);
+ max_bandwidth_filter.AddBandwidthSample(110, 2);
EXPECT_EQ(max_bandwidth_filter.FullBandwidthReached(1.25f, 3), false);
- max_bandwidth_filter.AddBandwidthSample(120, 3, 10);
+ max_bandwidth_filter.AddBandwidthSample(120, 3);
EXPECT_EQ(max_bandwidth_filter.FullBandwidthReached(1.25f, 3), false);
- max_bandwidth_filter.AddBandwidthSample(124, 4, 10);
+ max_bandwidth_filter.AddBandwidthSample(124, 4);
EXPECT_EQ(max_bandwidth_filter.FullBandwidthReached(1.25f, 3), true);
}
TEST(MaxBandwidthFilterTest, FullBandwidthNotReached) {
MaxBandwidthFilter max_bandwidth_filter;
- max_bandwidth_filter.AddBandwidthSample(100, 1, 10);
+ max_bandwidth_filter.AddBandwidthSample(100, 1);
EXPECT_EQ(max_bandwidth_filter.FullBandwidthReached(1.25f, 3), false);
- max_bandwidth_filter.AddBandwidthSample(110, 2, 10);
+ max_bandwidth_filter.AddBandwidthSample(110, 2);
EXPECT_EQ(max_bandwidth_filter.FullBandwidthReached(1.25f, 3), false);
- max_bandwidth_filter.AddBandwidthSample(120, 3, 10);
+ max_bandwidth_filter.AddBandwidthSample(120, 3);
EXPECT_EQ(max_bandwidth_filter.FullBandwidthReached(1.25f, 3), false);
- max_bandwidth_filter.AddBandwidthSample(125, 4, 10);
+ max_bandwidth_filter.AddBandwidthSample(125, 4);
EXPECT_EQ(max_bandwidth_filter.FullBandwidthReached(1.25f, 3), false);
}
} // namespace bwe

Powered by Google App Engine
This is Rietveld 408576698