OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "webrtc/modules/remote_bitrate_estimator/rate_statistics.h" | 12 #include "webrtc/base/rate_statistics.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 using webrtc::RateStatistics; | 16 using webrtc::RateStatistics; |
17 | 17 |
18 class RateStatisticsTest : public ::testing::Test { | 18 class RateStatisticsTest : public ::testing::Test { |
19 protected: | 19 protected: |
20 RateStatisticsTest() : stats_(500, 8000) {} | 20 RateStatisticsTest() : stats_(500, 8000) {} |
21 RateStatistics stats_; | 21 RateStatistics stats_; |
22 }; | 22 }; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 bitrate = new_bitrate; | 89 bitrate = new_bitrate; |
90 } | 90 } |
91 // Zero bytes per millisecond until 20-second mark, 0 kbps expected. | 91 // Zero bytes per millisecond until 20-second mark, 0 kbps expected. |
92 while (++now_ms < 20000) { | 92 while (++now_ms < 20000) { |
93 stats_.Update(0, now_ms); | 93 stats_.Update(0, now_ms); |
94 EXPECT_EQ(0u, stats_.Rate(now_ms)); | 94 EXPECT_EQ(0u, stats_.Rate(now_ms)); |
95 } | 95 } |
96 } | 96 } |
97 } // namespace | 97 } // namespace |
OLD | NEW |