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

Side by Side Diff: webrtc/modules/audio_processing/transient/file_utils_unittest.cc

Issue 1412653006: Fix Visual Studio 2015 WebRtc x86 build. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added comments for VS2015 compiler bug. Created 4 years, 10 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
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 false, // Write mode. 412 false, // Write mode.
413 false, // No loop. 413 false, // No loop.
414 false); // No text. 414 false); // No text.
415 ASSERT_TRUE(file->Open()) << "File could not be opened:\n" 415 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
416 << kOutFileName.c_str(); 416 << kOutFileName.c_str();
417 417
418 const size_t kBufferLength = 3; 418 const size_t kBufferLength = 3;
419 rtc::scoped_ptr<float[]> written_buffer(new float[kBufferLength]); 419 rtc::scoped_ptr<float[]> written_buffer(new float[kBufferLength]);
420 rtc::scoped_ptr<float[]> read_buffer(new float[kBufferLength]); 420 rtc::scoped_ptr<float[]> read_buffer(new float[kBufferLength]);
421 421
422 written_buffer[0] = kPi; 422 written_buffer[0] = static_cast<float>(kPi);
423 written_buffer[1] = kE; 423 written_buffer[1] = static_cast<float>(kE);
424 written_buffer[2] = kAvogadro; 424 written_buffer[2] = static_cast<float>(kAvogadro);
425 425
426 EXPECT_EQ(kBufferLength, WriteFloatBufferToFile(file.get(), 426 EXPECT_EQ(kBufferLength, WriteFloatBufferToFile(file.get(),
427 kBufferLength, 427 kBufferLength,
428 written_buffer.get())); 428 written_buffer.get()));
429 429
430 file->CloseFile(); 430 file->CloseFile();
431 431
432 file->OpenFile(kOutFileName.c_str(), 432 file->OpenFile(kOutFileName.c_str(),
433 true, // Read only. 433 true, // Read only.
434 false, // No loop. 434 false, // No loop.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 1, NULL)); 543 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 1, NULL));
544 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 0, int16_buffer.get())); 544 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 0, int16_buffer.get()));
545 545
546 EXPECT_EQ(0u, WriteDoubleBufferToFile(NULL, 1, double_buffer.get())); 546 EXPECT_EQ(0u, WriteDoubleBufferToFile(NULL, 1, double_buffer.get()));
547 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 1, NULL)); 547 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 1, NULL));
548 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 0, double_buffer.get())); 548 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 0, double_buffer.get()));
549 } 549 }
550 550
551 } // namespace webrtc 551 } // namespace webrtc
552 552
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698