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

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc

Issue 1316523002: Convert channel counts to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Rebase onto cleanup change Created 5 years 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_coding/neteq/neteq_stereo_unittest.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc
index e02e92dd8fd4ba99b83d5419007c5fab1cf0c27b..a5e3abfec22fadd5ad6c119296b5bf3f25a3cf0f 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc
@@ -28,7 +28,7 @@ namespace webrtc {
struct TestParameters {
int frame_size;
int sample_rate;
- int num_channels;
+ size_t num_channels;
};
// This is a parameterized test. The test parameters are supplied through a
@@ -164,7 +164,7 @@ class NetEqStereoTest : public ::testing::TestWithParam<TestParameters> {
void VerifyOutput(size_t num_samples) {
for (size_t i = 0; i < num_samples; ++i) {
- for (int j = 0; j < num_channels_; ++j) {
+ for (size_t j = 0; j < num_channels_; ++j) {
ASSERT_EQ(output_[i], output_multi_channel_[i * num_channels_ + j]) <<
"Diff in sample " << i << ", channel " << j << ".";
}
@@ -215,12 +215,12 @@ class NetEqStereoTest : public ::testing::TestWithParam<TestParameters> {
NetEqOutputType output_type;
// Get audio from mono instance.
size_t samples_per_channel;
- int num_channels;
+ size_t num_channels;
EXPECT_EQ(NetEq::kOK,
neteq_mono_->GetAudio(kMaxBlockSize, output_,
&samples_per_channel, &num_channels,
&output_type));
- EXPECT_EQ(1, num_channels);
+ EXPECT_EQ(1u, num_channels);
EXPECT_EQ(output_size_samples_, samples_per_channel);
// Get audio from multi-channel instance.
ASSERT_EQ(NetEq::kOK,
@@ -240,7 +240,7 @@ class NetEqStereoTest : public ::testing::TestWithParam<TestParameters> {
}
}
- const int num_channels_;
+ const size_t num_channels_;
const int sample_rate_hz_;
const int samples_per_ms_;
const int frame_size_ms_;

Powered by Google App Engine
This is Rietveld 408576698