#include "ClangTidyOptions.h"
#include "ClangTidyTest.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/HeaderGuardCheck.h"
#include "llvm/IncludeOrderCheck.h"
#include "gtest/gtest.h"
#include <optional>
usingnamespaceclang::tidy::llvm_check;
namespace clang {
namespace tidy {
namespace test {
template <typename T>
static std::string runCheck(StringRef Code, const Twine &Filename,
std::optional<StringRef> ExpectedWarning,
std::map<StringRef, StringRef> PathsToContent =
std::map<StringRef, StringRef>()) { … }
static std::string
runHeaderGuardCheck(StringRef Code, const Twine &Filename,
std::optional<StringRef> ExpectedWarning) { … }
static std::string
runIncludeOrderCheck(StringRef Code, const Twine &Filename,
std::optional<StringRef> ExpectedWarning,
llvm::ArrayRef<llvm::StringLiteral> Includes) { … }
namespace {
struct WithEndifComment : public LLVMHeaderGuardCheck { … };
static std::string
runHeaderGuardCheckWithEndif(StringRef Code, const Twine &Filename,
std::optional<StringRef> ExpectedWarning) { … }
}
TEST(LLVMHeaderGuardCheckTest, FixHeaderGuards) { … }
TEST(IncludeOrderCheck, GTestHeaders) { … }
}
}
}