From 0d7a38a81d1fdb8c9c522dce83fb63a41d30ebc3 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 8 Nov 2017 01:50:29 +0000 Subject: Convert FileOutputBuffer::commit to Error. llvm-svn: 317656 --- llvm/unittests/Support/FileOutputBufferTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/unittests/Support/FileOutputBufferTest.cpp') diff --git a/llvm/unittests/Support/FileOutputBufferTest.cpp b/llvm/unittests/Support/FileOutputBufferTest.cpp index 8e66b26ccda..e7f1fd765bd 100644 --- a/llvm/unittests/Support/FileOutputBufferTest.cpp +++ b/llvm/unittests/Support/FileOutputBufferTest.cpp @@ -51,7 +51,7 @@ TEST(FileOutputBuffer, Test) { // Write to end of buffer to verify it is writable. memcpy(Buffer->getBufferEnd() - 20, "AABBCCDDEEFFGGHHIIJJ", 20); // Commit buffer. - ASSERT_NO_ERROR(Buffer->commit()); + ASSERT_NO_ERROR(errorToErrorCode(Buffer->commit())); } // Verify file is correct size. @@ -89,7 +89,7 @@ TEST(FileOutputBuffer, Test) { memcpy(Buffer->getBufferStart(), "AABBCCDDEEFFGGHHIIJJ", 20); // Write to end of buffer to verify it is writable. memcpy(Buffer->getBufferEnd() - 20, "AABBCCDDEEFFGGHHIIJJ", 20); - ASSERT_NO_ERROR(Buffer->commit()); + ASSERT_NO_ERROR(errorToErrorCode(Buffer->commit())); } // Verify file is correct size. @@ -109,7 +109,7 @@ TEST(FileOutputBuffer, Test) { // Start buffer with special header. memcpy(Buffer->getBufferStart(), "AABBCCDDEEFFGGHHIIJJ", 20); // Commit buffer. - ASSERT_NO_ERROR(Buffer->commit()); + ASSERT_NO_ERROR(errorToErrorCode(Buffer->commit())); } // Verify file exists and is executable. fs::file_status Status; -- cgit v1.2.3