Chromium Code Reviews| Index: base/scoped_temp_dir_unittest.cc |
| =================================================================== |
| --- base/scoped_temp_dir_unittest.cc (revision 114285) |
| +++ base/scoped_temp_dir_unittest.cc (working copy) |
| @@ -2,6 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +#include <string> |
| + |
| #include "base/file_util.h" |
| #include "base/platform_file.h" |
| #include "base/scoped_temp_dir.h" |
| @@ -60,8 +62,8 @@ |
| TEST(ScopedTempDir, UniqueTempDirUnderPath) { |
| // Create a path which will contain a unique temp path. |
| FilePath base_path; |
| - file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("base_dir"), |
| - &base_path); |
| + ASSERT_TRUE(file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("base_dir"), |
| + &base_path)); |
| FilePath test_path; |
| { |
| @@ -73,6 +75,7 @@ |
| EXPECT_TRUE(test_path.value().find(base_path.value()) != std::string::npos); |
| } |
| EXPECT_FALSE(file_util::DirectoryExists(test_path)); |
| + file_util::Delete(base_path, true); |
|
Sigurður Ásgeirsson
2011/12/16 13:59:45
how ironic :).
Nico
2011/12/16 16:29:05
+1
|
| } |
| TEST(ScopedTempDir, MultipleInvocations) { |