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

Side by Side Diff: webrtc/common_audio/vad/vad_unittest.cc

Issue 2683033004: Enable cpplint and fix cpplint errors in webrtc/*audio (Closed)
Patch Set: Rebase 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/common_audio/vad/vad_unittest.h ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } else if (rate == 48000) { 45 } else if (rate == 48000) {
46 if (frame_length == 480 || frame_length == 960 || frame_length == 1440) { 46 if (frame_length == 480 || frame_length == 960 || frame_length == 1440) {
47 return true; 47 return true;
48 } 48 }
49 return false; 49 return false;
50 } 50 }
51 51
52 return false; 52 return false;
53 } 53 }
54 54
55 namespace { 55 namespace webrtc {
56 namespace test {
56 57
57 TEST_F(VadTest, ApiTest) { 58 TEST_F(VadTest, ApiTest) {
58 // This API test runs through the APIs for all possible valid and invalid 59 // This API test runs through the APIs for all possible valid and invalid
59 // combinations. 60 // combinations.
60 61
61 VadInst* handle = WebRtcVad_Create(); 62 VadInst* handle = WebRtcVad_Create();
62 int16_t zeros[kMaxFrameLength] = { 0 }; 63 int16_t zeros[kMaxFrameLength] = { 0 };
63 64
64 // Construct a speech signal that will trigger the VAD in all modes. It is 65 // Construct a speech signal that will trigger the VAD in all modes. It is
65 // known that (i * i) will wrap around, but that doesn't matter in this case. 66 // known that (i * i) will wrap around, but that doesn't matter in this case.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } else { 146 } else {
146 EXPECT_EQ(-1, WebRtcVad_ValidRateAndFrameLength(kRates[i], 147 EXPECT_EQ(-1, WebRtcVad_ValidRateAndFrameLength(kRates[i],
147 kFrameLengths[j])); 148 kFrameLengths[j]));
148 } 149 }
149 } 150 }
150 } 151 }
151 } 152 }
152 153
153 // TODO(bjornv): Add a process test, run on file. 154 // TODO(bjornv): Add a process test, run on file.
154 155
155 } // namespace 156 } // namespace test
157 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/common_audio/vad/vad_unittest.h ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698