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

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

Issue 1753293002: Safe numeric library: base/numerics (copied from Chromium) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase with master + correct new safe_conversions.h include Created 4 years, 9 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 Expand class. 11 // Unit tests for Expand class.
12 12
13 #include "webrtc/modules/audio_coding/neteq/expand.h" 13 #include "webrtc/modules/audio_coding/neteq/expand.h"
14 14
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "webrtc/base/safe_conversions.h" 16 #include "webrtc/base/numerics/safe_conversions.h"
17 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h" 17 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h"
18 #include "webrtc/modules/audio_coding/neteq/background_noise.h" 18 #include "webrtc/modules/audio_coding/neteq/background_noise.h"
19 #include "webrtc/modules/audio_coding/neteq/random_vector.h" 19 #include "webrtc/modules/audio_coding/neteq/random_vector.h"
20 #include "webrtc/modules/audio_coding/neteq/statistics_calculator.h" 20 #include "webrtc/modules/audio_coding/neteq/statistics_calculator.h"
21 #include "webrtc/modules/audio_coding/neteq/sync_buffer.h" 21 #include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
22 #include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h" 22 #include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h"
23 #include "webrtc/test/testsupport/fileutils.h" 23 #include "webrtc/test/testsupport/fileutils.h"
24 24
25 namespace webrtc { 25 namespace webrtc {
26 26
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 expand_.SetParametersForNormalAfterExpand(); 165 expand_.SetParametersForNormalAfterExpand();
166 // Convert |sum_output_len_samples| to milliseconds. 166 // Convert |sum_output_len_samples| to milliseconds.
167 EXPECT_EQ(rtc::checked_cast<int>(sum_output_len_samples / 167 EXPECT_EQ(rtc::checked_cast<int>(sum_output_len_samples /
168 (test_sample_rate_hz_ / 1000)), 168 (test_sample_rate_hz_ / 1000)),
169 statistics_.last_outage_duration_ms()); 169 statistics_.last_outage_duration_ms());
170 } 170 }
171 171
172 // TODO(hlundin): Write more tests. 172 // TODO(hlundin): Write more tests.
173 173
174 } // namespace webrtc 174 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/expand.cc ('k') | webrtc/modules/audio_coding/neteq/neteq_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698