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

Unified Diff: webrtc/common_audio/resampler/resampler_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
« no previous file with comments | « webrtc/common_audio/resampler/resampler.cc ('k') | webrtc/common_audio/resampler/sinc_resampler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/resampler/resampler_unittest.cc
diff --git a/webrtc/common_audio/resampler/resampler_unittest.cc b/webrtc/common_audio/resampler/resampler_unittest.cc
index 40a31bb0e026f9c8f82e058b7a011058d32692f4..c5953d030b1228a9c288f83468ced56ecc04b0b8 100644
--- a/webrtc/common_audio/resampler/resampler_unittest.cc
+++ b/webrtc/common_audio/resampler/resampler_unittest.cc
@@ -98,12 +98,12 @@ TEST_F(ResamplerTest, Mono) {
SCOPED_TRACE(ss.str());
if (ValidRates(kRates[i], kRates[j])) {
- int in_length = kRates[i] / 100;
- int out_length = 0;
+ size_t in_length = static_cast<size_t>(kRates[i] / 100);
+ size_t out_length = 0;
EXPECT_EQ(0, rs_.Reset(kRates[i], kRates[j], kChannels));
EXPECT_EQ(0, rs_.Push(data_in_, in_length, data_out_, kDataSize,
out_length));
- EXPECT_EQ(kRates[j] / 100, out_length);
+ EXPECT_EQ(static_cast<size_t>(kRates[j] / 100), out_length);
} else {
EXPECT_EQ(-1, rs_.Reset(kRates[i], kRates[j], kChannels));
}
@@ -120,13 +120,13 @@ TEST_F(ResamplerTest, Stereo) {
SCOPED_TRACE(ss.str());
if (ValidRates(kRates[i], kRates[j])) {
- int in_length = kChannels * kRates[i] / 100;
- int out_length = 0;
+ size_t in_length = static_cast<size_t>(kChannels * kRates[i] / 100);
+ size_t out_length = 0;
EXPECT_EQ(0, rs_.Reset(kRates[i], kRates[j],
kChannels));
EXPECT_EQ(0, rs_.Push(data_in_, in_length, data_out_, kDataSize,
out_length));
- EXPECT_EQ(kChannels * kRates[j] / 100, out_length);
+ EXPECT_EQ(static_cast<size_t>(kChannels * kRates[j] / 100), out_length);
} else {
EXPECT_EQ(-1, rs_.Reset(kRates[i], kRates[j],
kChannels));
« no previous file with comments | « webrtc/common_audio/resampler/resampler.cc ('k') | webrtc/common_audio/resampler/sinc_resampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698