#include "clang/Tooling/DiagnosticsYaml.h"
#include "clang/Tooling/Core/Diagnostic.h"
#include "clang/Tooling/ReplacementsYaml.h"
#include "llvm/ADT/SmallVector.h"
#include "gtest/gtest.h"
usingnamespacellvm;
usingnamespaceclang::tooling;
Diagnostic;
static DiagnosticMessage
makeMessage(const std::string &Message, int FileOffset,
const std::string &FilePath, const StringMap<Replacements> &Fix,
const SmallVector<FileByteRange, 1> &Ranges) { … }
static FileByteRange makeByteRange(int FileOffset,
int Length,
const std::string &FilePath) { … }
static Diagnostic makeDiagnostic(StringRef DiagnosticName,
const std::string &Message, int FileOffset,
const std::string &FilePath,
const StringMap<Replacements> &Fix,
const SmallVector<FileByteRange, 1> &Ranges,
Diagnostic::Level DiagnosticLevel) { … }
static const char *YAMLContent = …;
TEST(DiagnosticsYamlTest, serializesDiagnostics) { … }
TEST(DiagnosticsYamlTest, deserializesDiagnostics) { … }