llvm/clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp

//===---- IncludeInserterTest.cpp - clang-tidy ----------------------------===//
//
// 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 "../clang-tidy/utils/IncludeInserter.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Frontend/CompilerInstance.h"
#include "ClangTidyTest.h"
#include "gtest/gtest.h"

// FIXME: Canonicalize paths correctly on windows.
// Currently, adding virtual files will canonicalize the paths before
// storing the virtual entries.
// When resolving virtual entries in the FileManager, the paths (for
// example coming from a #include directive) are not canonicalized
// to native paths; thus, the virtual file is not found.
// This needs to be fixed in the FileManager before we can make
// clang-tidy tests work.
#if !defined(_WIN32)

namespace clang {
namespace tidy {
namespace {

class IncludeInserterCheckBase : public ClangTidyCheck {};

class NonSystemHeaderInserterCheck : public IncludeInserterCheckBase {};

class EarlyInAlphabetHeaderInserterCheck : public IncludeInserterCheckBase {};

class MultipleHeaderInserterCheck : public IncludeInserterCheckBase {};

class MultipleHeaderSingleInserterCheck : public IncludeInserterCheckBase {};

class CSystemIncludeInserterCheck : public IncludeInserterCheckBase {};

class CXXSystemIncludeInserterCheck : public IncludeInserterCheckBase {};

class InvalidIncludeInserterCheck : public IncludeInserterCheckBase {};

class ObjCEarlyInAlphabetHeaderInserterCheck : public IncludeInserterCheckBase {};

class ObjCCategoryHeaderInserterCheck : public IncludeInserterCheckBase {};

class ObjCGeneratedHeaderInserterCheck : public IncludeInserterCheckBase {};

template <typename Check>
std::string runCheckOnCode(StringRef Code, StringRef Filename) {}

TEST(IncludeInserterTest, InsertAfterLastNonSystemInclude) {}

TEST(IncludeInserterTest, InsertMultipleIncludesAndDeduplicate) {}

TEST(IncludeInserterTest, InsertMultipleIncludesNoDeduplicate) {}

TEST(IncludeInserterTest, InsertBeforeFirstNonSystemInclude) {}

TEST(IncludeInserterTest, InsertBetweenNonSystemIncludes) {}

TEST(IncludeInserterTest, NonSystemIncludeAlreadyIncluded) {}

TEST(IncludeInserterTest, InsertNonSystemIncludeAfterLastCXXSystemInclude) {}

TEST(IncludeInserterTest, InsertNonSystemIncludeAfterMainFileInclude) {}

TEST(IncludeInserterTest, InsertCXXSystemIncludeAfterLastCXXSystemInclude) {}

TEST(IncludeInserterTest, InsertCXXSystemIncludeBeforeFirstCXXSystemInclude) {}

TEST(IncludeInserterTest, InsertCXXSystemIncludeBetweenCXXSystemIncludes) {}

TEST(IncludeInserterTest, InsertCXXSystemIncludeAfterMainFileInclude) {}

TEST(IncludeInserterTest, InsertCXXSystemIncludeAfterCSystemInclude) {}

TEST(IncludeInserterTest, InsertCXXSystemIncludeBeforeNonSystemInclude) {}

TEST(IncludeInserterTest, InsertCSystemIncludeBeforeCXXSystemInclude) {}

TEST(IncludeInserterTest, InsertIncludeIfThereWasNoneBefore) {}

TEST(IncludeInserterTest, DontInsertDuplicateIncludeEvenIfMiscategorized) {}

TEST(IncludeInserterTest, HandleOrderInSubdirectory) {}

TEST(IncludeInserterTest, InvalidHeaderName) {}

TEST(IncludeInserterTest, InsertHeaderObjectiveC) {}

TEST(IncludeInserterTest, InsertCategoryHeaderObjectiveC) {}

TEST(IncludeInserterTest, InsertGeneratedHeaderObjectiveC) {}

} // anonymous namespace
} // namespace tidy
} // namespace clang

#endif