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

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

Issue 2358993004: Enable the -Wundef warning for clang (Closed)
Patch Set: rebase Created 4 years, 2 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
11 // Unit tests for DtmfToneGenerator class. 11 // Unit tests for DtmfToneGenerator class.
12 12
13 #include "webrtc/modules/audio_coding/neteq/dtmf_tone_generator.h" 13 #include "webrtc/modules/audio_coding/neteq/dtmf_tone_generator.h"
14 14
15 #include <math.h> 15 #include <math.h>
16 16
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "webrtc/test/gtest.h"
18 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h" 18 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 21
22 class DtmfToneGeneratorTest : public ::testing::Test { 22 class DtmfToneGeneratorTest : public ::testing::Test {
23 protected: 23 protected:
24 static const double kLowFreqHz[16]; 24 static const double kLowFreqHz[16];
25 static const double kHighFreqHz[16]; 25 static const double kHighFreqHz[16];
26 // This is the attenuation applied to all cases. 26 // This is the attenuation applied to all cases.
27 const double kBaseAttenuation = 16141.0 / 16384.0; 27 const double kBaseAttenuation = 16141.0 / 16384.0;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // NULL pointer to destination. 174 // NULL pointer to destination.
175 EXPECT_EQ(DtmfToneGenerator::kParameterError, 175 EXPECT_EQ(DtmfToneGenerator::kParameterError,
176 tone_gen.Generate(kNumSamples, NULL)); 176 tone_gen.Generate(kNumSamples, NULL));
177 } 177 }
178 178
179 } // namespace webrtc 179 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/dtmf_buffer_unittest.cc ('k') | webrtc/modules/audio_coding/neteq/expand_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698