parser_state_test.cpp 670 B

1234567891011121314151617181920212223
  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 "toolchain/parser/parser_state.h"
  5. #include <gtest/gtest.h>
  6. #include <cstring>
  7. #include "llvm/ADT/StringRef.h"
  8. namespace Carbon::Testing {
  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_PARSER_STATE(Name) \
  13. TEST(ParserState, Name) { EXPECT_EQ(#Name, ParserState::Name().name()); }
  14. #include "toolchain/parser/parser_state.def"
  15. } // namespace
  16. } // namespace Carbon::Testing