OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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/modules/remote_bitrate_estimator/test/metric_recorder.h" | 11 #include "webrtc/modules/remote_bitrate_estimator/test/metric_recorder.h" |
12 | 12 |
13 #include <math.h> | 13 #include <math.h> |
14 #include <algorithm> | 14 #include <algorithm> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "webrtc/test/gtest.h" |
18 | 18 |
19 namespace webrtc { | 19 namespace webrtc { |
20 namespace testing { | 20 namespace testing { |
21 namespace bwe { | 21 namespace bwe { |
22 | 22 |
23 class MetricRecorderTest : public ::testing::Test { | 23 class MetricRecorderTest : public ::testing::Test { |
24 public: | 24 public: |
25 MetricRecorderTest() : metric_recorder_("Test", 0, nullptr, nullptr) {} | 25 MetricRecorderTest() : metric_recorder_("Test", 0, nullptr, nullptr) {} |
26 | 26 |
27 ~MetricRecorderTest() {} | 27 ~MetricRecorderTest() {} |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 EXPECT_EQ(metric_recorder_.NthDelayPercentile(0), 1); | 100 EXPECT_EQ(metric_recorder_.NthDelayPercentile(0), 1); |
101 EXPECT_EQ(metric_recorder_.NthDelayPercentile(5), (5 * kNumPackets) / 100); | 101 EXPECT_EQ(metric_recorder_.NthDelayPercentile(5), (5 * kNumPackets) / 100); |
102 EXPECT_EQ(metric_recorder_.NthDelayPercentile(95), (95 * kNumPackets) / 100); | 102 EXPECT_EQ(metric_recorder_.NthDelayPercentile(95), (95 * kNumPackets) / 100); |
103 EXPECT_EQ(metric_recorder_.NthDelayPercentile(100), kNumPackets); | 103 EXPECT_EQ(metric_recorder_.NthDelayPercentile(100), kNumPackets); |
104 } | 104 } |
105 | 105 |
106 } // namespace bwe | 106 } // namespace bwe |
107 } // namespace testing | 107 } // namespace testing |
108 } // namespace webrtc | 108 } // namespace webrtc |
OLD | NEW |