llvm.org GIT mirror llvm / 29fa40c
Update unittest too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317651 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 1 year, 9 months ago
1 changed file(s) with 8 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
4141 SmallString<128> File1(TestDirectory);
4242 File1.append("/file1");
4343 {
44 ErrorOr> BufferOrErr =
44 Expected> BufferOrErr =
4545 FileOutputBuffer::create(File1, 8192);
46 ASSERT_NO_ERROR(BufferOrErr.getError());
46 ASSERT_NO_ERROR(errorToErrorCode(BufferOrErr.takeError()));
4747 std::unique_ptr &Buffer = *BufferOrErr;
4848 // Start buffer with special header.
4949 memcpy(Buffer->getBufferStart(), "AABBCCDDEEFFGGHHIIJJ", 20);
6363 SmallString<128> File2(TestDirectory);
6464 File2.append("/file2");
6565 {
66 ErrorOr> Buffer2OrErr =
66 Expected> Buffer2OrErr =
6767 FileOutputBuffer::create(File2, 8192);
68 ASSERT_NO_ERROR(Buffer2OrErr.getError());
68 ASSERT_NO_ERROR(errorToErrorCode(Buffer2OrErr.takeError()));
6969 std::unique_ptr &Buffer2 = *Buffer2OrErr;
7070 // Fill buffer with special header.
7171 memcpy(Buffer2->getBufferStart(), "AABBCCDDEEFFGGHHIIJJ", 20);
8080 SmallString<128> File3(TestDirectory);
8181 File3.append("/file3");
8282 {
83 ErrorOr> BufferOrErr =
83 Expected> BufferOrErr =
8484 FileOutputBuffer::create(File3, 8192000);
85 ASSERT_NO_ERROR(BufferOrErr.getError());
85 ASSERT_NO_ERROR(errorToErrorCode(BufferOrErr.takeError()));
8686 std::unique_ptr &Buffer = *BufferOrErr;
8787 // Start buffer with special header.
8888 memcpy(Buffer->getBufferStart(), "AABBCCDDEEFFGGHHIIJJ", 20);
101101 SmallString<128> File4(TestDirectory);
102102 File4.append("/file4");
103103 {
104 ErrorOr> BufferOrErr =
104 Expected> BufferOrErr =
105105 FileOutputBuffer::create(File4, 8192, FileOutputBuffer::F_executable);
106 ASSERT_NO_ERROR(BufferOrErr.getError());
106 ASSERT_NO_ERROR(errorToErrorCode(BufferOrErr.takeError()));
107107 std::unique_ptr &Buffer = *BufferOrErr;
108108 // Start buffer with special header.
109109 memcpy(Buffer->getBufferStart(), "AABBCCDDEEFFGGHHIIJJ", 20);