#include "Move.h"
#include "unittests/Tooling/RewriterTestContext.h"
#include "clang/Format/Format.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Frontend/TextDiagnosticPrinter.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "clang/Tooling/Refactoring.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/ADT/StringRef.h"
#include "gmock/gmock-matchers.h"
#include "gtest/gtest.h"
#include <string>
#include <vector>
namespace clang {
namespace move {
namespace {
const char TestHeader[] = …;
const char TestCC[] = …;
const char ExpectedTestHeader[] = …;
const char ExpectedTestCC[] = …;
const char ExpectedNewHeader[] = …;
const char ExpectedNewCC[] = …;
#ifdef _WIN32
const char WorkingDir[] = "C:\\test";
#else
const char WorkingDir[] = …;
#endif
const char TestHeaderName[] = …;
const char TestCCName[] = …;
std::map<std::string, std::string>
runClangMoveOnCode(const move::MoveDefinitionSpec &Spec,
const char *const Header = TestHeader,
const char *const CC = TestCC,
DeclarationReporter *const Reporter = nullptr) { … }
TEST(ClangMove, MoveHeaderAndCC) { … }
TEST(ClangMove, MoveHeaderOnly) { … }
TEST(ClangMove, MoveCCOnly) { … }
TEST(ClangMove, MoveNonExistClass) { … }
TEST(ClangMove, HeaderIncludeSelf) { … }
TEST(ClangMove, MoveAll) { … }
TEST(ClangMove, MoveAllMultipleClasses) { … }
TEST(ClangMove, DontMoveAll) { … }
TEST(ClangMove, IgnoreMacroSymbolsAndMoveAll) { … }
TEST(ClangMove, MacroInFunction) { … }
TEST(ClangMove, DefinitionInMacro) { … }
TEST(ClangMove, WellFormattedCode) { … }
TEST(ClangMove, AddDependentNewHeader) { … }
TEST(ClangMove, AddDependentOldHeader) { … }
TEST(ClangMove, DumpDecls) { … }
}
}
}