error_test.cpp 413 B

123456789101112131415
  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 "executable_semantics/common/error.h"
  5. #include "gtest/gtest.h"
  6. namespace Carbon {
  7. TEST(ErrorTest, FatalUserError) {
  8. ASSERT_DEATH({ FatalUserError() << "test"; }, "ERROR: test\n");
  9. }
  10. } // namespace Carbon