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

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

Issue 2966403002: Added implementation of three classes in BBR,with unit-tests. (Closed)
Patch Set: 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/min_rtt_filter_unittest.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/min_rtt_filter_unittest.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/min_rtt_filter_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..64f2bfa733c66fc48c4960556c03e2e3babdd8d4
--- /dev/null
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/min_rtt_filter_unittest.cc
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/remote_bitrate_estimator/test/estimators/min_rtt_filter.h"
+
+#include "webrtc/test/gtest.h"
+
+namespace webrtc {
+namespace testing {
+namespace bwe {
+TEST(MinRttFilterTest, InitializationCheck) {
+ MinRttFilter min_rtt_filter;
+ EXPECT_EQ(min_rtt_filter.min_rtt(), 10000000);
+ EXPECT_EQ(min_rtt_filter.discovery_time(), 0);
+}
+
+TEST(MinRttFilterTest, MinRttUpdate) {
+ MinRttFilter min_rtt_filter;
+ min_rtt_filter.UpdateMinRtt(120);
+ EXPECT_EQ(min_rtt_filter.min_rtt(), 120);
+}
+
+TEST(MinRttFilterTest, DiscoveryTimeUpdate) {
+ MinRttFilter min_rtt_filter;
+ min_rtt_filter.set_discovery_time(1240);
+ EXPECT_EQ(min_rtt_filter.discovery_time(), 1240);
+}
+} // namespace bwe
+} // namespace testing
+} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698