diagnostic_kind_test.cpp 591 B

12345678910111213141516171819202122
  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/diagnostics/diagnostic_kind.h"
  5. #include <gmock/gmock.h>
  6. #include <gtest/gtest.h>
  7. #include "llvm/Support/raw_ostream.h"
  8. namespace Carbon::Testing {
  9. namespace {
  10. TEST(DiagnosticKindTest, Name) {
  11. std::string buffer;
  12. llvm::raw_string_ostream(buffer) << DiagnosticKind::TestDiagnostic;
  13. EXPECT_EQ(buffer, "TestDiagnostic");
  14. }
  15. } // namespace
  16. } // namespace Carbon::Testing