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

Unified Diff: webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc

Issue 1228803003: Update audio code to use size_t more correctly, (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc
diff --git a/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc b/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc
index 404a66f3039aec7718cc0fb0940c09d3aaef299b..942008e7330eafeabec44d95d561ebb1c1c92894 100644
--- a/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc
+++ b/webrtc/modules/audio_processing/vad/standalone_vad_unittest.cc
@@ -27,9 +27,9 @@ TEST(StandaloneVadTest, Api) {
// Valid frame length (for 32 kHz rate), but not what the VAD is expecting.
EXPECT_EQ(-1, vad->AddAudio(data, 320));
- const int kMaxNumFrames = 3;
+ const size_t kMaxNumFrames = 3;
double p[kMaxNumFrames];
- for (int n = 0; n < kMaxNumFrames; n++)
+ for (size_t n = 0; n < kMaxNumFrames; n++)
EXPECT_EQ(0, vad->AddAudio(data, kLength10Ms));
// Pretend |p| is shorter that it should be.
@@ -41,7 +41,7 @@ TEST(StandaloneVadTest, Api) {
EXPECT_EQ(-1, vad->GetActivity(p, kMaxNumFrames));
// Should reset and result in one buffer.
- for (int n = 0; n < kMaxNumFrames + 1; n++)
+ for (size_t n = 0; n < kMaxNumFrames + 1; n++)
EXPECT_EQ(0, vad->AddAudio(data, kLength10Ms));
EXPECT_EQ(0, vad->GetActivity(p, 1));
« no previous file with comments | « webrtc/modules/audio_processing/vad/standalone_vad.cc ('k') | webrtc/modules/audio_processing/vad/vad_audio_proc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698