llvm/clang-tools-extra/pseudo/unittests/DirectiveTreeTest.cpp

//===--- DirectiveTreeTest.cpp --------------------------------------------===//
//
// 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-pseudo/DirectiveTree.h"

#include "clang-pseudo/Token.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/TokenKinds.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"

namespace clang {
namespace pseudo {
namespace {

_;
ElementsAre;
Matcher;
Pair;
StrEq;
Chunk;

// Matches text of a list of tokens against a string (joined with spaces).
// e.g. EXPECT_THAT(Stream.tokens(), tokens("int main ( ) { }"));
MATCHER_P(tokens, Tokens, "") {}

// Matches tokens covered a directive chunk (with a Tokens property) against a
// string, similar to tokens() above.
// e.g. EXPECT_THAT(SomeDirective, tokensAre(Stream, "# include < vector >"));
MATCHER_P2(tokensAre, TS, Tokens, "tokens are " + std::string(Tokens)) {}

MATCHER(directiveChunk, "") {}
MATCHER(codeChunk, "") {}
MATCHER(conditionalChunk, "") {}

TEST(DirectiveTree, Parse) {}

TEST(DirectiveTree, ParseUgly) {}

TEST(DirectiveTree, ParseBroken) {}

TEST(DirectiveTree, ChooseBranches) {}

TEST(DirectiveTree, StripDirectives) {}

} // namespace
} // namespace pseudo
} // namespace clang