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

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

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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.cc ('k') | webrtc/common_audio/wav_file.h » ('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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 speech[i] = static_cast<int16_t>(i * i); 69 speech[i] = static_cast<int16_t>(i * i);
70 } 70 }
71 71
72 // nullptr instance tests 72 // nullptr instance tests
73 EXPECT_EQ(-1, WebRtcVad_Init(nullptr)); 73 EXPECT_EQ(-1, WebRtcVad_Init(nullptr));
74 EXPECT_EQ(-1, WebRtcVad_set_mode(nullptr, kModes[0])); 74 EXPECT_EQ(-1, WebRtcVad_set_mode(nullptr, kModes[0]));
75 EXPECT_EQ(-1, 75 EXPECT_EQ(-1,
76 WebRtcVad_Process(nullptr, kRates[0], speech, kFrameLengths[0])); 76 WebRtcVad_Process(nullptr, kRates[0], speech, kFrameLengths[0]));
77 77
78 // WebRtcVad_Create() 78 // WebRtcVad_Create()
79 CHECK(handle); 79 RTC_CHECK(handle);
80 80
81 // Not initialized tests 81 // Not initialized tests
82 EXPECT_EQ(-1, WebRtcVad_Process(handle, kRates[0], speech, kFrameLengths[0])); 82 EXPECT_EQ(-1, WebRtcVad_Process(handle, kRates[0], speech, kFrameLengths[0]));
83 EXPECT_EQ(-1, WebRtcVad_set_mode(handle, kModes[0])); 83 EXPECT_EQ(-1, WebRtcVad_set_mode(handle, kModes[0]));
84 84
85 // WebRtcVad_Init() test 85 // WebRtcVad_Init() test
86 ASSERT_EQ(0, WebRtcVad_Init(handle)); 86 ASSERT_EQ(0, WebRtcVad_Init(handle));
87 87
88 // WebRtcVad_set_mode() invalid modes tests. Tries smallest supported value 88 // WebRtcVad_set_mode() invalid modes tests. Tries smallest supported value
89 // minus one and largest supported value plus one. 89 // minus one and largest supported value plus one.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 EXPECT_EQ(-1, WebRtcVad_ValidRateAndFrameLength(kRates[i], 147 EXPECT_EQ(-1, WebRtcVad_ValidRateAndFrameLength(kRates[i],
148 kFrameLengths[j])); 148 kFrameLengths[j]));
149 } 149 }
150 } 150 }
151 } 151 }
152 } 152 }
153 153
154 // TODO(bjornv): Add a process test, run on file. 154 // TODO(bjornv): Add a process test, run on file.
155 155
156 } // namespace 156 } // namespace
OLDNEW
« no previous file with comments | « webrtc/common_audio/vad/vad.cc ('k') | webrtc/common_audio/wav_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698