Debian Codegraph @

clang-tools-extra/pseudo/unittests/CXXTest.cpp

raw
1 //===--- CXXTest.cpp ------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "clang-pseudo/cxx/CXX.h"
10 #include "gtest/gtest.h"
11
12 namespace clang {
13 namespace pseudo {
14 namespace cxx {
15 namespace {
16
17 TEST(CXX, GeneratedEnums) {
18 const auto &Lang = clang::pseudo::cxx::getLanguage();
19 EXPECT_EQ("iteration-statement",
20 Lang.G.symbolName(Symbol::iteration_statement));
21 EXPECT_EQ("iteration-statement := DO statement WHILE ( expression ) ;",
22 Lang.G.dumpRule(
23 rule::iteration_statement::
24 DO__statement__WHILE__L_PAREN__expression__R_PAREN__SEMI));
25 }
26
27 } // namespace
28 } // namespace cxx
29 } // namespace pseudo
30 } // namespace clang