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

Unified Diff: webrtc/video/stats_counter_unittest.cc

Issue 2303763002: Use RateCounter for received bitrate stats. (Closed)
Patch Set: fix warning Created 4 years, 3 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/video/stats_counter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/stats_counter_unittest.cc
diff --git a/webrtc/video/stats_counter_unittest.cc b/webrtc/video/stats_counter_unittest.cc
index 5dd8b72cd6ebc2859bdc5221ca0fbdd73df788fa..d054eaa4b240cd720d09beaad690339a966a5bcc 100644
--- a/webrtc/video/stats_counter_unittest.cc
+++ b/webrtc/video/stats_counter_unittest.cc
@@ -72,6 +72,13 @@ TEST_F(StatsCounterTest, TestRegisterObserver) {
EXPECT_EQ(1, observer->num_calls_);
}
+TEST_F(StatsCounterTest, HasSample) {
+ AvgCounter counter(&clock_, nullptr);
+ EXPECT_FALSE(counter.HasSample());
+ counter.Add(1);
+ EXPECT_TRUE(counter.HasSample());
+}
+
TEST_F(StatsCounterTest, VerifyProcessInterval) {
StatsCounterObserverImpl* observer = new StatsCounterObserverImpl();
AvgCounter counter(&clock_, observer);
« no previous file with comments | « webrtc/video/stats_counter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698