Skip to content

Commit

Permalink
Drop a few unneeded ctor calls (missed code review comment).
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221845 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Paul Robinson committed Nov 13, 2014
1 parent 8839439 commit 4848765
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions unittests/Support/Path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,15 +397,15 @@ TEST_F(FileSystemTest, TempFiles) {
"abcdefghijklmnopqrstuvwxyz5abcdefghijklmnopqrstuvwxyz4"
"abcdefghijklmnopqrstuvwxyz3abcdefghijklmnopqrstuvwxyz2"
"abcdefghijklmnopqrstuvwxyz1abcdefghijklmnopqrstuvwxyz0";
EXPECT_EQ(fs::createUniqueFile(Twine(Path270), FileDescriptor, TempPath),
EXPECT_EQ(fs::createUniqueFile(Path270, FileDescriptor, TempPath),
errc::invalid_argument);
// Relative path < 247 chars, no problem.
const char *Path216 =
"abcdefghijklmnopqrstuvwxyz7abcdefghijklmnopqrstuvwxyz6"
"abcdefghijklmnopqrstuvwxyz5abcdefghijklmnopqrstuvwxyz4"
"abcdefghijklmnopqrstuvwxyz3abcdefghijklmnopqrstuvwxyz2"
"abcdefghijklmnopqrstuvwxyz1abcdefghijklmnopqrstuvwxyz0";
ASSERT_NO_ERROR(fs::createTemporaryFile(Twine(Path216), "", TempPath));
ASSERT_NO_ERROR(fs::createTemporaryFile(Path216, "", TempPath));
ASSERT_NO_ERROR(fs::remove(Twine(TempPath)));
#endif
}
Expand Down Expand Up @@ -456,10 +456,10 @@ TEST_F(FileSystemTest, CreateDir) {
// While we're here, prove that .. and . handling works in these long paths.
const char *DotDotDirs = "\\..\\.\\b";
LongDir.append(DotDotDirs);
ASSERT_NO_ERROR(fs::create_directory(Twine("b")));
ASSERT_NO_ERROR(fs::create_directory("b"));
ASSERT_EQ(fs::create_directory(Twine(LongDir), false), errc::file_exists);
// And clean up.
ASSERT_NO_ERROR(fs::remove(Twine("b")));
ASSERT_NO_ERROR(fs::remove("b"));
ASSERT_NO_ERROR(fs::remove(
Twine(LongDir.substr(0, LongDir.size() - strlen(DotDotDirs)))));
ASSERT_NE(::SetCurrentDirectoryA(PreviousDir), 0);
Expand Down

0 comments on commit 4848765

Please sign in to comment.