llvm.org GIT mirror llvm / 4848765
Drop a few unneeded ctor calls (missed code review comment). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221845 91177308-0d34-0410-b5e6-96231b3b80d8 Paul Robinson 4 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
396396 "abcdefghijklmnopqrstuvwxyz5abcdefghijklmnopqrstuvwxyz4"
397397 "abcdefghijklmnopqrstuvwxyz3abcdefghijklmnopqrstuvwxyz2"
398398 "abcdefghijklmnopqrstuvwxyz1abcdefghijklmnopqrstuvwxyz0";
399 EXPECT_EQ(fs::createUniqueFile(Twine(Path270), FileDescriptor, TempPath),
399 EXPECT_EQ(fs::createUniqueFile(Path270, FileDescriptor, TempPath),
400400 errc::invalid_argument);
401401 // Relative path < 247 chars, no problem.
402402 const char *Path216 =
404404 "abcdefghijklmnopqrstuvwxyz5abcdefghijklmnopqrstuvwxyz4"
405405 "abcdefghijklmnopqrstuvwxyz3abcdefghijklmnopqrstuvwxyz2"
406406 "abcdefghijklmnopqrstuvwxyz1abcdefghijklmnopqrstuvwxyz0";
407 ASSERT_NO_ERROR(fs::createTemporaryFile(Twine(Path216), "", TempPath));
407 ASSERT_NO_ERROR(fs::createTemporaryFile(Path216, "", TempPath));
408408 ASSERT_NO_ERROR(fs::remove(Twine(TempPath)));
409409 #endif
410410 }
455455 // While we're here, prove that .. and . handling works in these long paths.
456456 const char *DotDotDirs = "\\..\\.\\b";
457457 LongDir.append(DotDotDirs);
458 ASSERT_NO_ERROR(fs::create_directory(Twine("b")));
458 ASSERT_NO_ERROR(fs::create_directory("b"));
459459 ASSERT_EQ(fs::create_directory(Twine(LongDir), false), errc::file_exists);
460460 // And clean up.
461 ASSERT_NO_ERROR(fs::remove(Twine("b")));
461 ASSERT_NO_ERROR(fs::remove("b"));
462462 ASSERT_NO_ERROR(fs::remove(
463463 Twine(LongDir.substr(0, LongDir.size() - strlen(DotDotDirs)))));
464464 ASSERT_NE(::SetCurrentDirectoryA(PreviousDir), 0);