aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/Path.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-08-26 00:24:23 +0000
committerReid Kleckner <reid@kleckner.net>2014-08-26 00:24:23 +0000
commitd83c63b7044f38504f0e2d6281962f324dcf2afb (patch)
tree3d77103b11e3b14d8792d54810b3308f51b439f7 /llvm/unittests/Support/Path.cpp
parente6e88f99b35f2fde5008e36f0d93f5231564b7d8 (diff)
downloadllvm-d83c63b7044f38504f0e2d6281962f324dcf2afb.zip
llvm-d83c63b7044f38504f0e2d6281962f324dcf2afb.tar.gz
llvm-d83c63b7044f38504f0e2d6281962f324dcf2afb.tar.bz2
Fix Path unittests on Windows after raw_fd_ostream changes
llvm-svn: 216422
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
-rw-r--r--llvm/unittests/Support/Path.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index 22bf35d9..94ccab6 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/unittests/Support/Path.cpp
@@ -549,27 +549,27 @@ TEST_F(FileSystemTest, Magic) {
#ifdef LLVM_ON_WIN32
TEST_F(FileSystemTest, CarriageReturn) {
SmallString<128> FilePathname(TestDirectory);
- std::string ErrMsg;
+ std::error_code EC;
path::append(FilePathname, "test");
{
- raw_fd_ostream File(FilePathname, ErrMsg, sys::fs::F_Text);
- EXPECT_EQ(ErrMsg, "");
+ raw_fd_ostream File(FilePathname, EC, sys::fs::F_Text);
+ ASSERT_NO_ERROR(EC);
File << '\n';
}
{
- auto Buf = MemoryBuffer::getFile(FilePathname);
+ auto Buf = MemoryBuffer::getFile(FilePathname.str());
EXPECT_TRUE((bool)Buf);
EXPECT_EQ(Buf.get()->getBuffer(), "\r\n");
}
{
- raw_fd_ostream File(FilePathname, ErrMsg, sys::fs::F_None);
- EXPECT_EQ(ErrMsg, "");
+ raw_fd_ostream File(FilePathname, EC, sys::fs::F_None);
+ ASSERT_NO_ERROR(EC);
File << '\n';
}
{
- auto Buf = MemoryBuffer::getFile(FilePathname);
+ auto Buf = MemoryBuffer::getFile(FilePathname.str());
EXPECT_TRUE((bool)Buf);
EXPECT_EQ(Buf.get()->getBuffer(), "\n");
}