summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/unittests/Support/FileOutputBufferTest.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-01-24 08:32:59 +0000
committerpatrick <patrick@openbsd.org>2017-01-24 08:32:59 +0000
commit53d771aafdbe5b919f264f53cba3788e2c4cffd2 (patch)
tree7eca39498be0ff1e3a6daf583cd9ca5886bb2636 /gnu/llvm/unittests/Support/FileOutputBufferTest.cpp
parentIn preparation of compiling our kernels with -ffreestanding, explicitly map (diff)
downloadwireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.tar.xz
wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.zip
Import LLVM 4.0.0 rc1 including clang and lld to help the current
development effort on OpenBSD/arm64.
Diffstat (limited to 'gnu/llvm/unittests/Support/FileOutputBufferTest.cpp')
-rw-r--r--gnu/llvm/unittests/Support/FileOutputBufferTest.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/gnu/llvm/unittests/Support/FileOutputBufferTest.cpp b/gnu/llvm/unittests/Support/FileOutputBufferTest.cpp
index 090c476e35c..53a2ae0aadd 100644
--- a/gnu/llvm/unittests/Support/FileOutputBufferTest.cpp
+++ b/gnu/llvm/unittests/Support/FileOutputBufferTest.cpp
@@ -20,9 +20,12 @@ using namespace llvm::sys;
#define ASSERT_NO_ERROR(x) \
if (std::error_code ASSERT_NO_ERROR_ec = x) { \
- errs() << #x ": did not return errc::success.\n" \
- << "error number: " << ASSERT_NO_ERROR_ec.value() << "\n" \
- << "error message: " << ASSERT_NO_ERROR_ec.message() << "\n"; \
+ SmallString<128> MessageStorage; \
+ raw_svector_ostream Message(MessageStorage); \
+ Message << #x ": did not return errc::success.\n" \
+ << "error number: " << ASSERT_NO_ERROR_ec.value() << "\n" \
+ << "error message: " << ASSERT_NO_ERROR_ec.message() << "\n"; \
+ GTEST_FATAL_FAILURE_(MessageStorage.c_str()); \
} else { \
}
@@ -57,9 +60,9 @@ TEST(FileOutputBuffer, Test) {
ASSERT_EQ(File1Size, 8192ULL);
ASSERT_NO_ERROR(fs::remove(File1.str()));
- // TEST 2: Verify abort case.
+ // TEST 2: Verify abort case.
SmallString<128> File2(TestDirectory);
- File2.append("/file2");
+ File2.append("/file2");
{
ErrorOr<std::unique_ptr<FileOutputBuffer>> Buffer2OrErr =
FileOutputBuffer::create(File2, 8192);