llvm/lldb/unittests/Utility/StreamTest.cpp

//===-- StreamTest.cpp ----------------------------------------------------===//
//
// 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 "lldb/Utility/StreamString.h"
#include "gtest/gtest.h"

usingnamespacelldb_private;

namespace {
struct StreamTest : ::testing::Test {};
}

namespace {
// A StreamTest where we expect the Stream output to be binary.
struct BinaryStreamTest : StreamTest {};
}

TEST_F(StreamTest, AddressPrefix) {}

TEST_F(StreamTest, AddressEmptyPrefix) {}

TEST_F(StreamTest, AddressSuffix) {}

TEST_F(StreamTest, AddressNoSuffix) {}

TEST_F(StreamTest, AddressPrefixAndSuffix) {}

TEST_F(StreamTest, AddressSize) {}

TEST_F(StreamTest, AddressRange) {}

TEST_F(StreamTest, AddressRangeEmptyRange) {}

TEST_F(StreamTest, AddressRangeInvalidRange) {}

TEST_F(StreamTest, AddressRangeSize) {}

TEST_F(StreamTest, ChangingByteOrder) {}

TEST_F(StreamTest, SetIndentLevel) {}

TEST_F(StreamTest, Indent) {}

TEST_F(StreamTest, PutChar) {}

TEST_F(StreamTest, PutCharWhitespace) {}

TEST_F(StreamTest, PutCString) {}

TEST_F(StreamTest, PutCStringWithStringRef) {}

TEST_F(StreamTest, QuotedCString) {}

TEST_F(StreamTest, PutCharNull) {}

TEST_F(StreamTest, PutStringAsRawHex8) {}

TEST_F(StreamTest, PutHex8) {}

TEST_F(StreamTest, PutNHex8) {}

TEST_F(StreamTest, PutHex16ByteOrderLittle) {}

TEST_F(StreamTest, PutHex16ByteOrderBig) {}

TEST_F(StreamTest, PutHex32ByteOrderLittle) {}

TEST_F(StreamTest, PutHex32ByteOrderBig) {}

TEST_F(StreamTest, PutHex64ByteOrderLittle) {}

TEST_F(StreamTest, PutHex64ByteOrderBig) {}

TEST_F(StreamTest, PutMaxHex64ByteOrderBig) {}

TEST_F(StreamTest, PutMaxHex64ByteOrderLittle) {}

// Shift operator tests.

TEST_F(StreamTest, ShiftOperatorChars) {}

TEST_F(StreamTest, ShiftOperatorStrings) {}

TEST_F(StreamTest, ShiftOperatorPtr) {}

TEST_F(StreamTest, PutPtr) {}

// Alias to make it more clear that 'invalid' means for the Stream interface
// that it should use the host byte order.
const static auto hostByteOrder =;

// PutRawBytes/PutBytesAsRawHex tests.

TEST_F(StreamTest, PutBytesAsRawHex8ToBigEndian) {}

TEST_F(StreamTest, PutRawBytesToBigEndian) {}

TEST_F(StreamTest, PutBytesAsRawHex8ToLittleEndian) {}

TEST_F(StreamTest, PutRawBytesToLittleEndian) {}

TEST_F(StreamTest, PutBytesAsRawHex8ToMixedEndian) {}

TEST_F(StreamTest, PutRawBytesToMixedEndian) {}

TEST_F(StreamTest, PutRawBytesZeroLenght) {}

TEST_F(StreamTest, PutBytesAsRawHex8ZeroLenght) {}

// ULEB128 support for binary streams.

TEST_F(BinaryStreamTest, PutULEB128OneByte) {}

TEST_F(BinaryStreamTest, PutULEB128TwoBytes) {}

TEST_F(BinaryStreamTest, PutULEB128ThreeBytes) {}

TEST_F(BinaryStreamTest, PutULEB128FourBytes) {}

TEST_F(BinaryStreamTest, PutULEB128FiveBytes) {}

TEST_F(BinaryStreamTest, PutULEB128SixBytes) {}

TEST_F(BinaryStreamTest, PutULEB128SevenBytes) {}

TEST_F(BinaryStreamTest, PutULEB128EightBytes) {}

TEST_F(BinaryStreamTest, PutULEB128NineBytes) {}

TEST_F(BinaryStreamTest, PutULEB128MaxValue) {}

TEST_F(BinaryStreamTest, PutULEB128Zero) {}

TEST_F(BinaryStreamTest, PutULEB128One) {}

// SLEB128 support for binary streams.

TEST_F(BinaryStreamTest, PutSLEB128OneByte) {}

TEST_F(BinaryStreamTest, PutSLEB128TwoBytes) {}

TEST_F(BinaryStreamTest, PutSLEB128ThreeBytes) {}

TEST_F(BinaryStreamTest, PutSLEB128FourBytes) {}

TEST_F(BinaryStreamTest, PutSLEB128FiveBytes) {}

TEST_F(BinaryStreamTest, PutSLEB128SixBytes) {}

TEST_F(BinaryStreamTest, PutSLEB128SevenBytes) {}

TEST_F(BinaryStreamTest, PutSLEB128EightBytes) {}

TEST_F(BinaryStreamTest, PutSLEB128NineBytes) {}

TEST_F(BinaryStreamTest, PutSLEB128MaxValue) {}

TEST_F(BinaryStreamTest, PutSLEB128Zero) {}

TEST_F(BinaryStreamTest, PutSLEB128One) {}

// SLEB128/ULEB128 support for non-binary streams.

// The logic for this is very simple, so it should be enough to test some basic
// use cases.

TEST_F(StreamTest, PutULEB128) {}

TEST_F(StreamTest, PutSLEB128) {}