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

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

Issue 2966403002: Added implementation of three classes in BBR,with unit-tests. (Closed)
Patch Set: Added logic for entering/exiting modes in BBR, added new bandwidth filter. Created 3 years, 5 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/congestion_window_unittest.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc
index bc0d370bca5dc9ecff8af60dcda9fe8c022d60a3..869141f05a20056a0db6097486b748245d2fd9d0 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc
@@ -46,35 +46,38 @@ TEST(CongestionWindowTest, DataInflight) {
TEST(CongestionWindowTest, ZeroBandwidthDelayProduct) {
CongestionWindow congestion_window;
int64_t target_congestion_window =
- congestion_window.GetTargetCongestionWindow(100, 0, 2.885f);
+ congestion_window.GetTargetCongestionWindow(
+ 100, rtc::Optional<int64_t>(0), 2.885f);
EXPECT_EQ(target_congestion_window, 2.885f * kStartingCongestionWindow);
}
TEST(CongestionWindowTest, BelowMinimumTargetCongestionWindow) {
CongestionWindow congestion_window;
int64_t target_congestion_window =
- congestion_window.GetTargetCongestionWindow(100, 2, 2.885f);
+ congestion_window.GetTargetCongestionWindow(
+ 100, rtc::Optional<int64_t>(2), 2.885f);
EXPECT_EQ(target_congestion_window, kMinimumCongestionWindow);
}
TEST(CongestionWindowTest, AboveMinimumTargetCongestionWindow) {
CongestionWindow congestion_window;
int64_t target_congestion_window =
- congestion_window.GetTargetCongestionWindow(100000, 2, 2.885f);
+ congestion_window.GetTargetCongestionWindow(
+ 100000, rtc::Optional<int64_t>(2), 2.885f);
EXPECT_EQ(target_congestion_window, 577000);
}
TEST(CongestionWindowTest, MinimumCongestionWindow) {
CongestionWindow congestion_window;
- int64_t cwnd = congestion_window.GetCongestionWindow(BbrBweSender::PROBE_RTT,
- 100, 100, 2.885f);
+ int64_t cwnd = congestion_window.GetCongestionWindow(
+ BbrBweSender::PROBE_RTT, 100, rtc::Optional<int64_t>(100), 2.885f);
EXPECT_EQ(cwnd, kMinimumCongestionWindow);
}
TEST(CongestionWindowTest, CalculateCongestionWindow) {
CongestionWindow congestion_window;
- int64_t cwnd = congestion_window.GetCongestionWindow(BbrBweSender::STARTUP,
- 100, 100, 2.885f);
+ int64_t cwnd = congestion_window.GetCongestionWindow(
+ BbrBweSender::STARTUP, 100, rtc::Optional<int64_t>(100l), 2.885f);
EXPECT_EQ(cwnd, 28850);
}
} // namespace bwe

Powered by Google App Engine
This is Rietveld 408576698