llvm/clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp

//===--- IncludeCleanerTests.cpp --------------------------------*- C++ -*-===//
//
// 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 "Annotations.h"
#include "Diagnostics.h"
#include "IncludeCleaner.h"
#include "ParsedAST.h"
#include "SourceCode.h"
#include "TestFS.h"
#include "TestTU.h"
#include "clang-include-cleaner/Analysis.h"
#include "clang-include-cleaner/Types.h"
#include "clang/AST/DeclBase.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Tooling/Syntax/Tokens.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ScopedPrinter.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <cstddef>
#include <optional>
#include <string>
#include <vector>

namespace clang {
namespace clangd {
namespace {

AllOf;
ElementsAre;
IsEmpty;
Matcher;
Pointee;
UnorderedElementsAre;

Matcher<const Diag &>
withFix(std::vector<::testing::Matcher<Fix>> FixMatcheres) {}

MATCHER_P2(Diag, Range, Message,
           "Diag at " + llvm::to_string(Range) + " = [" + Message + "]") {}

MATCHER_P3(Fix, Range, Replacement, Message,
           "Fix " + llvm::to_string(Range) + " => " +
               ::testing::PrintToString(Replacement) + " = [" + Message + "]") {}
MATCHER_P(FixMessage, Message, "") {}

std::string guard(llvm::StringRef Code) {}

MATCHER_P(writtenInclusion, Written, "") {}

TEST(IncludeCleaner, StdlibUnused) {}

TEST(IncludeCleaner, GetUnusedHeaders) {}

TEST(IncludeCleaner, IgnoredAngledHeaders) {}

TEST(IncludeCleaner, UnusedAngledHeaders) {}

TEST(IncludeCleaner, ComputeMissingHeaders) {}

TEST(IncludeCleaner, GenerateMissingHeaderDiags) {}

TEST(IncludeCleaner, IWYUPragmas) {}

TEST(IncludeCleaner, IWYUPragmaExport) {}

TEST(IncludeCleaner, NoDiagsForObjC) {}

TEST(IncludeCleaner, UmbrellaUsesPrivate) {}

TEST(IncludeCleaner, MacroExpandedThroughIncludes) {}

TEST(IncludeCleaner, MissingIncludesAreUnique) {}

TEST(IncludeCleaner, NoCrash) {}

TEST(IncludeCleaner, IsPreferredProvider) {}

TEST(IncludeCleaner, BatchFix) {}

// In the presence of IWYU pragma private, we should accept spellings other
// than the recommended one if they appear to name the same public header.
TEST(IncludeCleaner, VerbatimEquivalence) {}

TEST(IncludeCleaner, ResourceDirIsIgnored) {}

TEST(IncludeCleaner, DifferentHeaderSameSpelling) {}
} // namespace
} // namespace clangd
} // namespace clang