OLD | NEW |
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 Loading... |
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 64. | 167 // Initialize with invalid attenuation 64. |
168 EXPECT_EQ(DtmfToneGenerator::kParameterError, tone_gen.Init(fs, event, 64)); | 168 EXPECT_EQ(DtmfToneGenerator::kParameterError, tone_gen.Init(fs, event, 64)); |
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 // 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, nullptr)); |
177 } | 177 } |
178 | 178 |
179 } // namespace webrtc | 179 } // namespace webrtc |
OLD | NEW |