parse_node_kind_test.cpp 701 B

12345678910111213141516171819202122232425
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #include "parser/parse_node_kind.h"
  5. #include <cstring>
  6. #include "gtest/gtest.h"
  7. #include "llvm/ADT/StringRef.h"
  8. namespace Carbon {
  9. namespace {
  10. // Not much to test here, so just verify that the API compiles and returns the
  11. // data in the `.def` file.
  12. #define CARBON_PARSE_NODE_KIND(Name) \
  13. TEST(ParseNodeKindTest, Name) { \
  14. EXPECT_EQ(#Name, ParseNodeKind::Name().GetName()); \
  15. }
  16. #include "parser/parse_node_kind.def"
  17. } // namespace
  18. } // namespace Carbon