llvm/clang/unittests/AST/StmtPrinterTest.cpp

//===- unittests/AST/StmtPrinterTest.cpp --- Statement 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 Stmt::printPretty() and related methods.
//
// Search this file for WRONG to see test cases that are producing something
// completely wrong, invalid C++ or just misleading.
//
// These tests have a coding convention:
// * statements to be printed should be contained within a function 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/ASTMatchers/ASTMatchFinder.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/ADT/SmallString.h"
#include "gtest/gtest.h"

usingnamespaceclang;
usingnamespaceast_matchers;
usingnamespacetooling;

namespace {

enum class StdVer {};

DeclarationMatcher FunctionBodyMatcher(StringRef ContainingFunction) {}

static void PrintStmt(raw_ostream &Out, const ASTContext *Context,
                      const Stmt *S, PrintingPolicyAdjuster PolicyAdjuster) {}

template <typename Matcher>
::testing::AssertionResult
PrintedStmtMatches(StringRef Code, const std::vector<std::string> &Args,
                   const Matcher &NodeMatch, StringRef ExpectedPrinted,
                   PrintingPolicyAdjuster PolicyAdjuster = nullptr) {}

template <typename T>
::testing::AssertionResult
PrintedStmtCXXMatches(StdVer Standard, StringRef Code, const T &NodeMatch,
                      StringRef ExpectedPrinted,
                      PrintingPolicyAdjuster PolicyAdjuster = nullptr) {}

template <typename T>
::testing::AssertionResult
PrintedStmtMSMatches(StringRef Code, const T &NodeMatch,
                     StringRef ExpectedPrinted,
                     PrintingPolicyAdjuster PolicyAdjuster = nullptr) {}

template <typename T>
::testing::AssertionResult
PrintedStmtObjCMatches(StringRef Code, const T &NodeMatch,
                       StringRef ExpectedPrinted,
                       PrintingPolicyAdjuster PolicyAdjuster = nullptr) {}

} // unnamed namespace

TEST(StmtPrinter, TestIntegerLiteral) {}

TEST(StmtPrinter, TestMSIntegerLiteral) {}

TEST(StmtPrinter, TestFloatingPointLiteral) {}

TEST(StmtPrinter, TestStringLiteralOperatorTemplate_Pack) {}

TEST(StmtPrinter, TestStringLiteralOperatorTemplate_Class) {}

TEST(StmtPrinter, TestCXXConversionDeclImplicit) {}

TEST(StmtPrinter, TestCXXConversionDeclExplicit) {}

TEST(StmtPrinter, TestCXXLamda) {}

TEST(StmtPrinter, TestNoImplicitBases) {}

TEST(StmtPrinter, TerseOutputWithLambdas) {}

TEST(StmtPrinter, ParamsUglified) {}