Remove use of tmpnam.
This solves compilation with the Mac SDK 10.9. BUG=3120, 3151 TEST=git try -t modules_tests:VideoProcessorIntegrationTest* R=fischman@webrtc.org, henrike@webrtc.org, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/10739005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5917 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -46,7 +46,7 @@ class FileUtilsTest : public testing::Test {
|
||||
original_working_dir_ = webrtc::test::WorkingDir();
|
||||
std::string resources_path = original_working_dir_ + kPathDelimiter +
|
||||
kResourcesDir + kPathDelimiter;
|
||||
webrtc::test::CreateDirectory(resources_path);
|
||||
webrtc::test::CreateDir(resources_path);
|
||||
|
||||
files_.push_back(resources_path + kTestName + "." + kExtension);
|
||||
files_.push_back(resources_path + kTestName + "_32." + kExtension);
|
||||
@ -117,12 +117,19 @@ TEST_F(FileUtilsTest, DISABLED_ON_ANDROID(OutputPathFromRootWorkingDir)) {
|
||||
ASSERT_EQ("./", webrtc::test::OutputPath());
|
||||
}
|
||||
|
||||
TEST_F(FileUtilsTest, DISABLED_ON_ANDROID(TempFilename)) {
|
||||
std::string temp_filename = webrtc::test::TempFilename(
|
||||
webrtc::test::OutputPath(), "TempFilenameTest");
|
||||
ASSERT_TRUE(webrtc::test::FileExists(temp_filename));
|
||||
remove(temp_filename.c_str());
|
||||
}
|
||||
|
||||
// Only tests that the code executes
|
||||
TEST_F(FileUtilsTest, CreateDirectory) {
|
||||
TEST_F(FileUtilsTest, CreateDir) {
|
||||
std::string directory = "fileutils-unittest-empty-dir";
|
||||
// Make sure it's removed if a previous test has failed:
|
||||
remove(directory.c_str());
|
||||
ASSERT_TRUE(webrtc::test::CreateDirectory(directory));
|
||||
ASSERT_TRUE(webrtc::test::CreateDir(directory));
|
||||
remove(directory.c_str());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user