OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 EXPECT_EQ(1, stats.GetMin()); | 174 EXPECT_EQ(1, stats.GetMin()); |
175 EXPECT_EQ(3, stats.GetMax()); | 175 EXPECT_EQ(3, stats.GetMax()); |
176 | 176 |
177 stats.Push(-4); | 177 stats.Push(-4); |
178 EXPECT_EQ(-4, stats.GetMin()); | 178 EXPECT_EQ(-4, stats.GetMin()); |
179 EXPECT_EQ(3, stats.GetMax()); | 179 EXPECT_EQ(3, stats.GetMax()); |
180 } | 180 } |
181 | 181 |
182 class BweTestFramework_RateCounterFilterTest : public ::testing::Test { | 182 class BweTestFramework_RateCounterFilterTest : public ::testing::Test { |
183 public: | 183 public: |
184 BweTestFramework_RateCounterFilterTest() : filter_(NULL, 0, ""), now_ms_(0) {} | 184 BweTestFramework_RateCounterFilterTest() |
| 185 : filter_(NULL, 0, "", ""), now_ms_(0) {} |
185 virtual ~BweTestFramework_RateCounterFilterTest() {} | 186 virtual ~BweTestFramework_RateCounterFilterTest() {} |
186 | 187 |
187 protected: | 188 protected: |
188 void TestRateCounter(int64_t run_for_ms, uint32_t payload_bits, | 189 void TestRateCounter(int64_t run_for_ms, uint32_t payload_bits, |
189 uint32_t expected_pps, uint32_t expected_bps) { | 190 uint32_t expected_pps, uint32_t expected_bps) { |
190 Packets packets; | 191 Packets packets; |
191 RTPHeader header; | 192 RTPHeader header; |
192 // "Send" a packet every 10 ms. | 193 // "Send" a packet every 10 ms. |
193 for (int64_t i = 0; i < run_for_ms; i += 10, now_ms_ += 10) { | 194 for (int64_t i = 0; i < run_for_ms; i += 10, now_ms_ += 10) { |
194 packets.push_back( | 195 packets.push_back( |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 packets.push_back(feedback); | 1042 packets.push_back(feedback); |
1042 sender.RunFor(10000, &packets); | 1043 sender.RunFor(10000, &packets); |
1043 EXPECT_EQ(820000u, source.bits_per_second()); | 1044 EXPECT_EQ(820000u, source.bits_per_second()); |
1044 | 1045 |
1045 for (auto* packet : packets) | 1046 for (auto* packet : packets) |
1046 delete packet; | 1047 delete packet; |
1047 } | 1048 } |
1048 } // namespace bwe | 1049 } // namespace bwe |
1049 } // namespace testing | 1050 } // namespace testing |
1050 } // namespace webrtc | 1051 } // namespace webrtc |
OLD | NEW |