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

Side by Side Diff: webrtc/modules/audio_coding/neteq/dtmf_tone_generator_unittest.cc

Issue 1228843002: 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, 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 unified diff | Download patch
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 tone_gen.Init(fs, 16, attenuation)); 164 tone_gen.Init(fs, 16, attenuation));
165 // Initialize with invalid attenuation -1. 165 // Initialize with invalid attenuation -1.
166 EXPECT_EQ(DtmfToneGenerator::kParameterError, tone_gen.Init(fs, event, -1)); 166 EXPECT_EQ(DtmfToneGenerator::kParameterError, tone_gen.Init(fs, event, -1));
167 // Initialize with invalid attenuation 37. 167 // Initialize with invalid attenuation 37.
168 EXPECT_EQ(DtmfToneGenerator::kParameterError, tone_gen.Init(fs, event, 37)); 168 EXPECT_EQ(DtmfToneGenerator::kParameterError, tone_gen.Init(fs, event, 37));
169 EXPECT_FALSE(tone_gen.initialized()); // Should still be uninitialized. 169 EXPECT_FALSE(tone_gen.initialized()); // Should still be uninitialized.
170 170
171 // Initialize with valid parameters. 171 // Initialize with valid parameters.
172 ASSERT_EQ(0, tone_gen.Init(fs, event, attenuation)); 172 ASSERT_EQ(0, tone_gen.Init(fs, event, attenuation));
173 EXPECT_TRUE(tone_gen.initialized()); 173 EXPECT_TRUE(tone_gen.initialized());
174 // Negative number of samples.
175 EXPECT_EQ(DtmfToneGenerator::kParameterError, tone_gen.Generate(-1, &signal));
176 // NULL pointer to destination. 174 // NULL pointer to destination.
177 EXPECT_EQ(DtmfToneGenerator::kParameterError, 175 EXPECT_EQ(DtmfToneGenerator::kParameterError,
178 tone_gen.Generate(kNumSamples, NULL)); 176 tone_gen.Generate(kNumSamples, NULL));
179 } 177 }
180 178
181 } // namespace webrtc 179 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc ('k') | webrtc/modules/audio_coding/neteq/expand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698