#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FormatAdapters.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
usingnamespacellvm;
HasSubstr;
namespace {
struct Format : public FormatAdapter<int> { … };
uses_format_member;
uses_missing_provider;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
struct NoFormat { … };
static_assert …;
}
static SmallVector<ReplacementItem, 2> parseFormatString(StringRef Fmt) { … }
TEST(FormatVariadicTest, EmptyFormatString) { … }
TEST(FormatVariadicTest, NoReplacements) { … }
TEST(FormatVariadicTest, EscapedBrace) { … }
TEST(FormatVariadicTest, ValidReplacementSequence) { … }
TEST(FormatVariadicTest, DefaultReplacementValues) { … }
TEST(FormatVariadicTest, MultipleReplacements) { … }
TEST(FormatVariadicTest, AutomaticIndices) { … }
TEST(FormatVariadicTest, FormatNoReplacements) { … }
TEST(FormatVariadicTest, FormatBasicTypesOneReplacement) { … }
TEST(FormatVariadicTest, FormatAutomaticIndices) { … }
TEST(FormatVariadicTest, IntegralHexFormatting) { … }
TEST(FormatVariadicTest, PointerFormatting) { … }
TEST(FormatVariadicTest, IntegralNumberFormatting) { … }
TEST(FormatVariadicTest, StringFormatting) { … }
TEST(FormatVariadicTest, CharFormatting) { … }
TEST(FormatVariadicTest, BoolTest) { … }
TEST(FormatVariadicTest, DoubleFormatting) { … }
TEST(FormatVariadicTest, CustomPaddingCharacter) { … }
struct format_tuple { … };
TEST(FormatVariadicTest, BigTest) { … }
TEST(FormatVariadicTest, Range) { … }
TEST(FormatVariadicTest, Adapter) { … }
TEST(FormatVariadicTest, MoveConstructor) { … }
TEST(FormatVariadicTest, ImplicitConversions) { … }
TEST(FormatVariadicTest, FormatAdapter) { … }
TEST(FormatVariadicTest, FormatFormatvObject) { … }
namespace {
struct Recorder { … };
}
namespace llvm {
template <> struct format_provider<Recorder> { … };
}
TEST(FormatVariadicTest, CopiesAndMoves) { … }
namespace adl {
struct X { … };
raw_ostream &operator<<(raw_ostream &OS, const X &) { … }
}
TEST(FormatVariadicTest, FormatStreamable) { … }
TEST(FormatVariadicTest, FormatError) { … }
TEST(FormatVariadicTest, FormatFilterRange) { … }
TEST(FormatVariadicTest, Validate) { … }
namespace {
enum class Base { … };
class IntegerValuesRange final
: public indexed_accessor_range<IntegerValuesRange, Base, int, int *, int> { … };
TEST(FormatVariadicTest, FormatRangeNonRef) { … }
}