Use tmp files in file_utils_unittests
The static file names were breaking when executing tests in parallel. This fixes it.
BUG=4138
R=andrew@webrtc.org, pbos@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/34639004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7997 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_processing/transient/file_utils_unittest.cc b/webrtc/modules/audio_processing/transient/file_utils_unittest.cc
index af2f9b3..89d4da7 100644
--- a/webrtc/modules/audio_processing/transient/file_utils_unittest.cc
+++ b/webrtc/modules/audio_processing/transient/file_utils_unittest.cc
@@ -308,7 +308,8 @@
TEST_F(TransientFileUtilsTest, WriteInt16BufferToFile) {
scoped_ptr<FileWrapper> file(FileWrapper::Create());
- std::string kOutFileName = test::OutputPath() + "utils_test.out";
+ std::string kOutFileName = test::TempFilename(test::OutputPath(),
+ "utils_test");
file->OpenFile(kOutFileName.c_str(),
false, // Write mode.
@@ -349,7 +350,8 @@
TEST_F(TransientFileUtilsTest, WriteFloatBufferToFile) {
scoped_ptr<FileWrapper> file(FileWrapper::Create());
- std::string kOutFileName = test::OutputPath() + "utils_test.out";
+ std::string kOutFileName = test::TempFilename(test::OutputPath(),
+ "utils_test");
file->OpenFile(kOutFileName.c_str(),
false, // Write mode.
@@ -390,7 +392,8 @@
TEST_F(TransientFileUtilsTest, WriteDoubleBufferToFile) {
scoped_ptr<FileWrapper> file(FileWrapper::Create());
- std::string kOutFileName = test::OutputPath() + "utils_test.out";
+ std::string kOutFileName = test::TempFilename(test::OutputPath(),
+ "utils_test");
file->OpenFile(kOutFileName.c_str(),
false, // Write mode.