#include "llvm/Support/MemoryBuffer.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/SmallVectorMemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"
#if LLVM_ENABLE_THREADS
#include <thread>
#endif
#if LLVM_ON_UNIX
#include <unistd.h>
#endif
#if _WIN32
#include <windows.h>
#endif
usingnamespacellvm;
#define ASSERT_NO_ERROR(x) …
#define ASSERT_ERROR(x) …
namespace {
class MemoryBufferTest : public testing::Test { … };
TEST_F(MemoryBufferTest, get) { … }
TEST_F(MemoryBufferTest, getOpenFile) { … }
TEST_F(MemoryBufferTest, NullTerminator4K) { … }
TEST_F(MemoryBufferTest, copy) { … }
#if LLVM_ENABLE_THREADS
TEST_F(MemoryBufferTest, createFromPipe) { … }
#endif
TEST_F(MemoryBufferTest, make_new) { … }
TEST_F(MemoryBufferTest, getNewAligned) { … }
void MemoryBufferTest::testGetOpenFileSlice(bool Reopen) { … }
TEST_F(MemoryBufferTest, getOpenFileNoReopen) { … }
TEST_F(MemoryBufferTest, getOpenFileReopened) { … }
TEST_F(MemoryBufferTest, slice) { … }
TEST_F(MemoryBufferTest, writableSlice) { … }
TEST_F(MemoryBufferTest, writeThroughFile) { … }
TEST_F(MemoryBufferTest, mmapVolatileNoNull) { … }
TEST(SmallVectorMemoryBufferTest, WithoutNullTerminatorRequiresNullTerminator) { … }
TEST(SmallVectorMemoryBufferTest, WithNullTerminatorRequiresNullTerminator) { … }
}