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
This commit is contained in:
aluebs@webrtc.org 2015-01-05 18:45:22 +00:00
parent 76bc981b2d
commit e5a921a82d

View File

@ -308,7 +308,8 @@ TEST_F(TransientFileUtilsTest, ReadDoubleBufferFromFile) {
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, WriteInt16BufferToFile) {
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, WriteFloatBufferToFile) {
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.