llvm/clang/unittests/AST/NamedDeclPrinterTest.cpp

//===- unittests/AST/NamedDeclPrinterTest.cpp --- NamedDecl printer 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
//
//===----------------------------------------------------------------------===//
//
// This file contains tests for NamedDecl::printQualifiedName().
//
// These tests have a coding convention:
// * declaration to be printed is named 'A' unless it should have some special
// name (e.g., 'operator+');
// * additional helper declarations are 'Z', 'Y', 'X' and so on.
//
//===----------------------------------------------------------------------===//

#include "ASTPrint.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"
#include "gtest/gtest.h"

usingnamespaceclang;
usingnamespaceast_matchers;
usingnamespacetooling;

namespace {

class PrintMatch : public MatchFinder::MatchCallback {};

::testing::AssertionResult PrintedDeclMatches(
    StringRef Code, const std::vector<std::string> &Args,
    const DeclarationMatcher &NodeMatch, StringRef ExpectedPrinted,
    StringRef FileName,
    std::function<void(llvm::raw_ostream &, const NamedDecl *)> Print) {}

::testing::AssertionResult
PrintedNamedDeclMatches(StringRef Code, const std::vector<std::string> &Args,
                        bool SuppressUnwrittenScope,
                        const DeclarationMatcher &NodeMatch,
                        StringRef ExpectedPrinted, StringRef FileName) {}

::testing::AssertionResult
PrintedNamedDeclCXX98Matches(StringRef Code, StringRef DeclName,
                             StringRef ExpectedPrinted) {}

::testing::AssertionResult
PrintedWrittenNamedDeclCXX11Matches(StringRef Code, StringRef DeclName,
                                    StringRef ExpectedPrinted) {}

::testing::AssertionResult
PrintedWrittenPropertyDeclObjCMatches(StringRef Code, StringRef DeclName,
                                   StringRef ExpectedPrinted) {}

::testing::AssertionResult
PrintedNestedNameSpecifierMatches(StringRef Code, StringRef DeclName,
                                  StringRef ExpectedPrinted) {}

} // unnamed namespace

TEST(NamedDeclPrinter, TestNamespace1) {}

TEST(NamedDeclPrinter, TestNamespace2) {}

TEST(NamedDeclPrinter, TestUnscopedUnnamedEnum) {}

TEST(NamedDeclPrinter, TestNamedEnum) {}

TEST(NamedDeclPrinter, TestScopedNamedEnum) {}

TEST(NamedDeclPrinter, TestClassWithUnscopedUnnamedEnum) {}

TEST(NamedDeclPrinter, TestClassWithUnscopedNamedEnum) {}

TEST(NamedDeclPrinter, TestClassWithScopedNamedEnum) {}

TEST(NamedDeclPrinter, TestLinkageInNamespace) {}

TEST(NamedDeclPrinter, TestObjCClassExtension) {}

TEST(NamedDeclPrinter, TestInstanceObjCClassExtension) {}

TEST(NamedDeclPrinter, TestObjCClassExtensionWithGetter) {}

TEST(NamedDeclPrinter, NestedNameSpecifierSimple) {}

TEST(NamedDeclPrinter, NestedNameSpecifierTemplateArgs) {}