Bump version to 19.1.0 (final)
[llvm-project.git] / clang-tools-extra / pseudo / unittests / CXXTest.cpp
blob505f958ae7556c391f41fa5807b3ef90f5c815aa
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 //===----------------------------------------------------------------------===//
9 #include "clang-pseudo/cxx/CXX.h"
10 #include "gtest/gtest.h"
12 namespace clang {
13 namespace pseudo {
14 namespace cxx {
15 namespace {
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));
27 } // namespace
28 } // namespace cxx
29 } // namespace pseudo
30 } // namespace clang