#include "llvm/Support/Errc.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "gtest/gtest.h"
usingnamespacellvm;
usingnamespacellvm::sys;
#define ASSERT_NO_ERROR(x) …
namespace {
std::error_code CreateFileWithContent(const SmallString<128> &FilePath,
const StringRef &content) { … }
class ScopedFD { … };
bool FDHasContent(int FD, StringRef Content) { … }
bool FileHasContent(StringRef File, StringRef Content) { … }
TEST(rename, FileOpenedForReadingCanBeReplaced) { … }
TEST(rename, ExistingTemp) { … }
}