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

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

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_sp_unittest.cc ('k') | webrtc/common_audio/vad/vad_unittest.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
11 #ifndef WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H 11 #ifndef WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H_
12 #define WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H 12 #define WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H_
13 13
14 #include <stddef.h> // size_t 14 #include <stddef.h> // size_t
15 15
16 #include "webrtc/test/gtest.h" 16 #include "webrtc/test/gtest.h"
17 #include "webrtc/typedefs.h" 17 #include "webrtc/typedefs.h"
18 18
19 namespace { 19 namespace webrtc {
20 namespace test {
20 21
21 // Modes we support 22 // Modes we support
22 const int kModes[] = { 0, 1, 2, 3 }; 23 const int kModes[] = { 0, 1, 2, 3 };
23 const size_t kModesSize = sizeof(kModes) / sizeof(*kModes); 24 const size_t kModesSize = sizeof(kModes) / sizeof(*kModes);
24 25
25 // Rates we support. 26 // Rates we support.
26 const int kRates[] = { 8000, 12000, 16000, 24000, 32000, 48000 }; 27 const int kRates[] = { 8000, 12000, 16000, 24000, 32000, 48000 };
27 const size_t kRatesSize = sizeof(kRates) / sizeof(*kRates); 28 const size_t kRatesSize = sizeof(kRates) / sizeof(*kRates);
28 29
29 // Frame lengths we support. 30 // Frame lengths we support.
30 const size_t kMaxFrameLength = 1440; 31 const size_t kMaxFrameLength = 1440;
31 const size_t kFrameLengths[] = { 80, 120, 160, 240, 320, 480, 640, 960, 32 const size_t kFrameLengths[] = { 80, 120, 160, 240, 320, 480, 640, 960,
32 kMaxFrameLength }; 33 kMaxFrameLength };
33 const size_t kFrameLengthsSize = sizeof(kFrameLengths) / sizeof(*kFrameLengths); 34 const size_t kFrameLengthsSize = sizeof(kFrameLengths) / sizeof(*kFrameLengths);
34 35
35 } // namespace 36 } // namespace test
37 } // namespace webrtc
36 38
37 class VadTest : public ::testing::Test { 39 class VadTest : public ::testing::Test {
38 protected: 40 protected:
39 VadTest(); 41 VadTest();
40 virtual void SetUp(); 42 virtual void SetUp();
41 virtual void TearDown(); 43 virtual void TearDown();
42 44
43 // Returns true if the rate and frame length combination is valid. 45 // Returns true if the rate and frame length combination is valid.
44 bool ValidRatesAndFrameLengths(int rate, size_t frame_length); 46 bool ValidRatesAndFrameLengths(int rate, size_t frame_length);
45 }; 47 };
46 48
47 #endif // WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H 49 #endif // WEBRTC_COMMON_AUDIO_VAD_VAD_UNITTEST_H_
OLDNEW
« no previous file with comments | « webrtc/common_audio/vad/vad_sp_unittest.cc ('k') | webrtc/common_audio/vad/vad_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698