check_test.cpp 438 B

1234567891011121314151617
  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 "common/check.h"
  5. #include "gtest/gtest.h"
  6. namespace Carbon {
  7. TEST(CheckTest, CheckTrue) { CHECK(true); }
  8. TEST(CheckTest, CheckFalse) {
  9. ASSERT_DEATH({ CHECK(false); }, "LLVM ERROR: CHECK failure: false");
  10. }
  11. } // namespace Carbon