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/file_utils.h" | 11 #include "webrtc/modules/audio_processing/transient/file_utils.h" |
12 | 12 |
13 #include <string.h> | 13 #include <string.h> |
14 #include <string> | 14 #include <string> |
15 #include <memory> | 15 #include <memory> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
| 18 #include "webrtc/system_wrappers/include/file_wrapper.h" |
18 #include "webrtc/test/gtest.h" | 19 #include "webrtc/test/gtest.h" |
19 #include "webrtc/system_wrappers/include/file_wrapper.h" | |
20 #include "webrtc/test/testsupport/fileutils.h" | 20 #include "webrtc/test/testsupport/fileutils.h" |
21 #include "webrtc/typedefs.h" | 21 #include "webrtc/typedefs.h" |
22 | 22 |
23 namespace webrtc { | 23 namespace webrtc { |
24 | 24 |
25 static const uint8_t kPiBytesf[4] = {0xDB, 0x0F, 0x49, 0x40}; | 25 static const uint8_t kPiBytesf[4] = {0xDB, 0x0F, 0x49, 0x40}; |
26 static const uint8_t kEBytesf[4] = {0x54, 0xF8, 0x2D, 0x40}; | 26 static const uint8_t kEBytesf[4] = {0x54, 0xF8, 0x2D, 0x40}; |
27 static const uint8_t kAvogadroBytesf[4] = {0x2F, 0x0C, 0xFF, 0x66}; | 27 static const uint8_t kAvogadroBytesf[4] = {0x2F, 0x0C, 0xFF, 0x66}; |
28 | 28 |
29 static const uint8_t kPiBytes[8] = | 29 static const uint8_t kPiBytes[8] = |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 1, NULL)); | 530 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 1, NULL)); |
531 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 0, int16_buffer.get())); | 531 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 0, int16_buffer.get())); |
532 | 532 |
533 EXPECT_EQ(0u, WriteDoubleBufferToFile(NULL, 1, double_buffer.get())); | 533 EXPECT_EQ(0u, WriteDoubleBufferToFile(NULL, 1, double_buffer.get())); |
534 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 1, NULL)); | 534 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 1, NULL)); |
535 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 0, double_buffer.get())); | 535 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 0, double_buffer.get())); |
536 } | 536 } |
537 | 537 |
538 } // namespace webrtc | 538 } // namespace webrtc |
539 | 539 |
OLD | NEW |