OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
| 11 #include "webrtc/test/gtest.h" |
| 12 #include "webrtc/base/random.h" |
11 #include "webrtc/modules/congestion_controller/trendline_estimator.h" | 13 #include "webrtc/modules/congestion_controller/trendline_estimator.h" |
12 #include "webrtc/rtc_base/random.h" | |
13 #include "webrtc/test/gtest.h" | |
14 | 14 |
15 namespace webrtc { | 15 namespace webrtc { |
16 | 16 |
17 namespace { | 17 namespace { |
18 constexpr size_t kWindowSize = 20; | 18 constexpr size_t kWindowSize = 20; |
19 constexpr double kSmoothing = 0.0; | 19 constexpr double kSmoothing = 0.0; |
20 constexpr double kGain = 1; | 20 constexpr double kGain = 1; |
21 constexpr int64_t kAvgTimeBetweenPackets = 10; | 21 constexpr int64_t kAvgTimeBetweenPackets = 10; |
22 constexpr size_t kPacketCount = 2 * kWindowSize + 1; | 22 constexpr size_t kPacketCount = 2 * kWindowSize + 1; |
23 | 23 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 TEST(TrendlineEstimator, JitteryLineSlopeMinusOne) { | 65 TEST(TrendlineEstimator, JitteryLineSlopeMinusOne) { |
66 TestEstimator(-1, kAvgTimeBetweenPackets / 3.0, 0.075); | 66 TestEstimator(-1, kAvgTimeBetweenPackets / 3.0, 0.075); |
67 } | 67 } |
68 | 68 |
69 TEST(TrendlineEstimator, JitteryLineSlopeZero) { | 69 TEST(TrendlineEstimator, JitteryLineSlopeZero) { |
70 TestEstimator(0, kAvgTimeBetweenPackets / 3.0, 0.02); | 70 TestEstimator(0, kAvgTimeBetweenPackets / 3.0, 0.02); |
71 } | 71 } |
72 | 72 |
73 } // namespace webrtc | 73 } // namespace webrtc |
OLD | NEW |