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

Side by Side Diff: webrtc/modules/video_coding/jitter_estimator_tests.cc

Issue 2767393003: Fix cpplint errors in locations that are already being checked (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_packet_history_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 1 /* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2 * 2 *
3 * Use of this source code is governed by a BSD-style license 3 * Use of this source code is governed by a BSD-style license
4 * that can be found in the LICENSE file in the root of the source 4 * that can be found in the LICENSE file in the root of the source
5 * tree. An additional intellectual property rights grant can be found 5 * tree. An additional intellectual property rights grant can be found
6 * in the file PATENTS. All contributing project authors may 6 * in the file PATENTS. All contributing project authors may
7 * be found in the AUTHORS file in the root of the source tree. 7 * be found in the AUTHORS file in the root of the source tree.
8 */ 8 */
9 9
10 #include "webrtc/modules/video_coding/jitter_estimator.h" 10 #include "webrtc/modules/video_coding/jitter_estimator.h"
(...skipping 28 matching lines...) Expand all
39 39
40 virtual void SetUp() { regular_estimator_.Reset(); } 40 virtual void SetUp() { regular_estimator_.Reset(); }
41 41
42 TestEstimator regular_estimator_; 42 TestEstimator regular_estimator_;
43 TestEstimator low_rate_estimator_; 43 TestEstimator low_rate_estimator_;
44 }; 44 };
45 45
46 // Generates some simple test data in the form of a sawtooth wave. 46 // Generates some simple test data in the form of a sawtooth wave.
47 class ValueGenerator { 47 class ValueGenerator {
48 public: 48 public:
49 ValueGenerator(int32_t amplitude) : amplitude_(amplitude), counter_(0) {} 49 explicit ValueGenerator(int32_t amplitude)
50 : amplitude_(amplitude), counter_(0) {}
50 virtual ~ValueGenerator() {} 51 virtual ~ValueGenerator() {}
51 52
52 int64_t Delay() { return ((counter_ % 11) - 5) * amplitude_; } 53 int64_t Delay() { return ((counter_ % 11) - 5) * amplitude_; }
53 54
54 uint32_t FrameSize() { return 1000 + Delay(); } 55 uint32_t FrameSize() { return 1000 + Delay(); }
55 56
56 void Advance() { ++counter_; } 57 void Advance() { ++counter_; }
57 58
58 private: 59 private:
59 const int32_t amplitude_; 60 const int32_t amplitude_;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 break; 151 break;
151 } 152 }
152 153
153 gen.Advance(); 154 gen.Advance();
154 } 155 }
155 156
156 EXPECT_NE(regular_iterations, 0); 157 EXPECT_NE(regular_iterations, 0);
157 EXPECT_NE(low_rate_iterations, 0); 158 EXPECT_NE(low_rate_iterations, 0);
158 EXPECT_LE(low_rate_iterations, regular_iterations); 159 EXPECT_LE(low_rate_iterations, regular_iterations);
159 } 160 }
160 } 161 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_packet_history_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698