OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include "webrtc/modules/audio_processing/transient/dyadic_decimator.h" | 11 #include "webrtc/modules/audio_processing/transient/dyadic_decimator.h" |
12 | 12 |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "webrtc/test/gtest.h" |
14 | 14 |
15 namespace webrtc { | 15 namespace webrtc { |
16 | 16 |
17 static const size_t kEvenBufferLength = 6; | 17 static const size_t kEvenBufferLength = 6; |
18 static const size_t kOddBufferLength = 5; | 18 static const size_t kOddBufferLength = 5; |
19 static const size_t kOutBufferLength = 3; | 19 static const size_t kOutBufferLength = 3; |
20 | 20 |
21 int16_t const test_buffer_even_len[] = {0, 1, 2, 3, 4, 5}; | 21 int16_t const test_buffer_even_len[] = {0, 1, 2, 3, 4, 5}; |
22 int16_t const test_buffer_odd_len[] = {0, 1, 2, 3, 4}; | 22 int16_t const test_buffer_odd_len[] = {0, 1, 2, 3, 4}; |
23 int16_t test_buffer_out[kOutBufferLength]; | 23 int16_t test_buffer_out[kOutBufferLength]; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 test_buffer_out, | 117 test_buffer_out, |
118 kOutBufferLength); | 118 kOutBufferLength); |
119 | 119 |
120 EXPECT_EQ(expected_out_samples, out_samples); | 120 EXPECT_EQ(expected_out_samples, out_samples); |
121 | 121 |
122 EXPECT_EQ(1, test_buffer_out[0]); | 122 EXPECT_EQ(1, test_buffer_out[0]); |
123 EXPECT_EQ(3, test_buffer_out[1]); | 123 EXPECT_EQ(3, test_buffer_out[1]); |
124 } | 124 } |
125 | 125 |
126 } // namespace webrtc | 126 } // namespace webrtc |
OLD | NEW |