llvm/llvm/unittests/Support/raw_ostream_test.cpp

//===- llvm/unittest/Support/raw_ostream_test.cpp - raw_ostream 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
//
//===----------------------------------------------------------------------===//

#include "llvm/ADT/SmallString.h"
#include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX
#include "llvm/Support/Errc.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"
#include <optional>

usingnamespacellvm;

namespace {

template<typename T> std::string printToString(const T &Value) {}

/// printToString - Print the given value to a stream which only has \arg
/// BytesLeftInBuffer bytes left in the buffer. This is useful for testing edge
/// cases in the buffer handling logic.
template<typename T> std::string printToString(const T &Value,
                                               unsigned BytesLeftInBuffer) {}

template<typename T> std::string printToStringUnbuffered(const T &Value) {}

struct X {};

raw_ostream &operator<<(raw_ostream &OS, const X &) {}

TEST(raw_ostreamTest, Types_Buffered) {}

TEST(raw_ostreamTest, Types_Unbuffered) {}

TEST(raw_ostreamTest, BufferEdge) {}

TEST(raw_ostreamTest, TinyBuffer) {}

TEST(raw_ostreamTest, WriteEscaped) {}

TEST(raw_ostreamTest, Justify) {}

TEST(raw_ostreamTest, Indent) {}

TEST(raw_ostreamTest, FormatHex) {}

TEST(raw_ostreamTest, FormatDecimal) {}

static std::string
formatted_bytes_str(ArrayRef<uint8_t> Bytes,
                    std::optional<uint64_t> Offset = std::nullopt,
                    uint32_t NumPerLine = 16, uint8_t ByteGroupSize = 4) {}

static std::string format_bytes_with_ascii_str(
    ArrayRef<uint8_t> Bytes, std::optional<uint64_t> Offset = std::nullopt,
    uint32_t NumPerLine = 16, uint8_t ByteGroupSize = 4) {}

TEST(raw_ostreamTest, FormattedHexBytes) {}

#ifdef LLVM_ON_UNIX
TEST(raw_ostreamTest, Colors) {}
#endif

TEST(raw_fd_ostreamTest, multiple_raw_fd_ostream_to_stdout) {}

TEST(raw_ostreamTest, flush_tied_to_stream_on_write) {}

static void checkFileData(StringRef FileName, StringRef GoldenData) {}

TEST(raw_ostreamTest, raw_fd_ostream_mutual_ties) {}

TEST(raw_ostreamTest, reserve_stream) {}

TEST(raw_ostreamTest, writeToOutputFile) {}

#ifndef _WIN32
TEST(raw_ostreamTest, filePermissions) {}
#endif

TEST(raw_ostreamTest, writeToNonexistingPath) {}

TEST(raw_ostreamTest, writeToDevNull) {}

TEST(raw_ostreamTest, writeToStdOut) {}

} // namespace