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: Fix the Visual Studio 2015 build Created 5 years, 1 month 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) 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 false, // Write mode. 358 false, // Write mode.
359 false, // No loop. 359 false, // No loop.
360 false); // No text. 360 false); // No text.
361 ASSERT_TRUE(file->Open()) << "File could not be opened:\n" 361 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
362 << kOutFileName.c_str(); 362 << kOutFileName.c_str();
363 363
364 const size_t kBufferLength = 3; 364 const size_t kBufferLength = 3;
365 rtc::scoped_ptr<float[]> written_buffer(new float[kBufferLength]); 365 rtc::scoped_ptr<float[]> written_buffer(new float[kBufferLength]);
366 rtc::scoped_ptr<float[]> read_buffer(new float[kBufferLength]); 366 rtc::scoped_ptr<float[]> read_buffer(new float[kBufferLength]);
367 367
368 written_buffer[0] = kPi; 368 written_buffer[0] = (float)kPi;
hlundin-webrtc 2015/11/11 15:59:38 Please, use static_cast<float)>(kPi) and so on.
369 written_buffer[1] = kE; 369 written_buffer[1] = (float)kE;
370 written_buffer[2] = kAvogadro; 370 written_buffer[2] = (float)kAvogadro;
371 371
372 EXPECT_EQ(kBufferLength, WriteFloatBufferToFile(file.get(), 372 EXPECT_EQ(kBufferLength, WriteFloatBufferToFile(file.get(),
373 kBufferLength, 373 kBufferLength,
374 written_buffer.get())); 374 written_buffer.get()));
375 375
376 file->CloseFile(); 376 file->CloseFile();
377 377
378 file->OpenFile(kOutFileName.c_str(), 378 file->OpenFile(kOutFileName.c_str(),
379 true, // Read only. 379 true, // Read only.
380 false, // No loop. 380 false, // No loop.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 1, NULL)); 479 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 1, NULL));
480 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 0, int16_buffer.get())); 480 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 0, int16_buffer.get()));
481 481
482 EXPECT_EQ(0u, WriteDoubleBufferToFile(NULL, 1, double_buffer.get())); 482 EXPECT_EQ(0u, WriteDoubleBufferToFile(NULL, 1, double_buffer.get()));
483 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 1, NULL)); 483 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 1, NULL));
484 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 0, double_buffer.get())); 484 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 0, double_buffer.get()));
485 } 485 }
486 486
487 } // namespace webrtc 487 } // namespace webrtc
488 488
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/isac/main/test/simpleKenny.c ('k') | webrtc/video_engine/payload_router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698