llvm/llvm/unittests/Support/MemoryBufferTest.cpp

//===- llvm/unittest/Support/MemoryBufferTest.cpp - MemoryBuffer tests ----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements unit tests for the MemoryBuffer support class.
//
//===----------------------------------------------------------------------===//

#include "llvm/Support/MemoryBuffer.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Config/llvm-config.h" // for LLVM_ENABLE_THREADS, LLVM_ON_UNIX
#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 that SmallVector without a null terminator gets one.
TEST(SmallVectorMemoryBufferTest, WithoutNullTerminatorRequiresNullTerminator) {}

// Test that SmallVector with a null terminator keeps it.
TEST(SmallVectorMemoryBufferTest, WithNullTerminatorRequiresNullTerminator) {}

} // namespace