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

Unified Diff: webrtc/base/analytics/percentile_filter_unittest.cc

Issue 2512693002: Implement Theil-Sen's method for fitting a line to noisy data (used in bandwidth estimation). (Closed)
Patch Set: Remove PercentileFilter::Clear since no longer used. Created 4 years 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/base/analytics/percentile_filter.h ('k') | webrtc/modules/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/analytics/percentile_filter_unittest.cc
diff --git a/webrtc/base/analytics/percentile_filter_unittest.cc b/webrtc/base/analytics/percentile_filter_unittest.cc
index 98168fd27be25da60a7e169b9cd0646a3c41d89f..02b7d091cbc2b9b661594374c43461be0f241ddd 100644
--- a/webrtc/base/analytics/percentile_filter_unittest.cc
+++ b/webrtc/base/analytics/percentile_filter_unittest.cc
@@ -84,15 +84,18 @@ TEST(PercentileFilterTest, MedianFilterUnsigned) {
TEST_P(PercentileFilterTest, EmptyFilter) {
EXPECT_EQ(0, filter_.GetPercentileValue());
filter_.Insert(3);
- filter_.Erase(3);
+ bool success = filter_.Erase(3);
+ EXPECT_TRUE(success);
EXPECT_EQ(0, filter_.GetPercentileValue());
}
TEST_P(PercentileFilterTest, EraseNonExistingElement) {
- filter_.Erase(3);
+ bool success = filter_.Erase(3);
+ EXPECT_FALSE(success);
EXPECT_EQ(0, filter_.GetPercentileValue());
filter_.Insert(4);
- filter_.Erase(3);
+ success = filter_.Erase(3);
+ EXPECT_FALSE(success);
EXPECT_EQ(4, filter_.GetPercentileValue());
}
« no previous file with comments | « webrtc/base/analytics/percentile_filter.h ('k') | webrtc/modules/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698