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

Unified Diff: webrtc/modules/audio_device/android/audio_manager_unittest.cc

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 4 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_device/android/audio_manager_unittest.cc
diff --git a/webrtc/modules/audio_device/android/audio_manager_unittest.cc b/webrtc/modules/audio_device/android/audio_manager_unittest.cc
index f790e6a6bc4e9d4c35d868c91635e10e37c0a0ca..a5af8b068397c84ef7dd38fad2b50751ee4a6a10 100644
--- a/webrtc/modules/audio_device/android/audio_manager_unittest.cc
+++ b/webrtc/modules/audio_device/android/audio_manager_unittest.cc
@@ -110,10 +110,10 @@ TEST_F(AudioManagerTest, AudioParametersWithDefaultConstruction) {
EXPECT_EQ(0, params.sample_rate());
EXPECT_EQ(0, params.channels());
EXPECT_EQ(0, params.frames_per_buffer());
- EXPECT_EQ(0, params.frames_per_10ms_buffer());
+ EXPECT_EQ(0U, params.frames_per_10ms_buffer());
EXPECT_EQ(0, params.GetBytesPerFrame());
EXPECT_EQ(0, params.GetBytesPerBuffer());
- EXPECT_EQ(0, params.GetBytesPer10msBuffer());
+ EXPECT_EQ(0U, params.GetBytesPer10msBuffer());
EXPECT_EQ(0.0f, params.GetBufferSizeInMilliseconds());
}
@@ -122,7 +122,7 @@ TEST_F(AudioManagerTest, AudioParametersWithNonDefaultConstruction) {
const int kSampleRate = 48000;
const int kChannels = 1;
const int kFramesPerBuffer = 480;
- const int kFramesPer10msBuffer = 480;
+ const size_t kFramesPer10msBuffer = 480;
const int kBytesPerFrame = 2;
const float kBufferSizeInMs = 10.0f;
AudioParameters params(kSampleRate, kChannels, kFramesPerBuffer);
@@ -130,7 +130,8 @@ TEST_F(AudioManagerTest, AudioParametersWithNonDefaultConstruction) {
EXPECT_EQ(kSampleRate, params.sample_rate());
EXPECT_EQ(kChannels, params.channels());
EXPECT_EQ(kFramesPerBuffer, params.frames_per_buffer());
- EXPECT_EQ(kSampleRate / 100, params.frames_per_10ms_buffer());
+ EXPECT_EQ(static_cast<size_t>(kSampleRate / 100),
+ params.frames_per_10ms_buffer());
EXPECT_EQ(kBytesPerFrame, params.GetBytesPerFrame());
EXPECT_EQ(kBytesPerFrame * kFramesPerBuffer, params.GetBytesPerBuffer());
EXPECT_EQ(kBytesPerFrame * kFramesPer10msBuffer,
« no previous file with comments | « webrtc/modules/audio_device/android/audio_device_unittest.cc ('k') | webrtc/modules/audio_device/android/audio_record_jni.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698