llvm/clang/unittests/Tooling/ExecutionTest.cpp

//===- unittest/Tooling/ExecutionTest.cpp - Tool execution tests. --------===//
//
// 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/Tooling/Execution.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Frontend/ASTUnit.h"
#include "clang/Frontend/FrontendAction.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Tooling/AllTUsExecution.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "clang/Tooling/StandaloneExecution.h"
#include "clang/Tooling/ToolExecutorPluginRegistry.h"
#include "clang/Tooling/Tooling.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <algorithm>
#include <string>

namespace clang {
namespace tooling {

namespace {

// This traverses the AST and outputs function name as key and "1" as value for
// each function declaration.
class ASTConsumerWithResult
    : public ASTConsumer,
      public RecursiveASTVisitor<ASTConsumerWithResult> {};

class ReportResultAction : public ASTFrontendAction {};

class ReportResultActionFactory : public FrontendActionFactory {};

} // namespace

class TestToolExecutor : public ToolExecutor {};

const char *TestToolExecutor::ExecutorName =;

class TestToolExecutorPlugin : public ToolExecutorPlugin {};

static ToolExecutorPluginRegistry::Add<TestToolExecutorPlugin>
    X("test-executor", "Plugin for TestToolExecutor.");

llvm::cl::OptionCategory TestCategory("execution-test options");

TEST(CreateToolExecutorTest, FailedCreateExecutorUndefinedFlag) {}

TEST(CreateToolExecutorTest, RegisterFlagsBeforeReset) {}

TEST(CreateToolExecutorTest, CreateStandaloneToolExecutor) {}

TEST(CreateToolExecutorTest, CreateTestToolExecutor) {}

TEST(StandaloneToolTest, SynctaxOnlyActionOnSimpleCode) {}

TEST(StandaloneToolTest, SimpleAction) {}

TEST(StandaloneToolTest, SimpleActionWithResult) {}

class FixedCompilationDatabaseWithFiles : public CompilationDatabase {};

MATCHER_P(Named, Name, "") {}

TEST(AllTUsToolTest, AFewFiles) {}

TEST(AllTUsToolTest, ManyFiles) {}

} // end namespace tooling
} // end namespace clang