mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 06:40:11 +01:00
Add a FatalUserError macro to help print user-caused errors. (#668)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
#include "executable_semantics/common/error.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace Carbon {
|
||||
|
||||
TEST(ErrorTest, FatalUserError) {
|
||||
ASSERT_DEATH({ FatalUserError() << "test"; }, "ERROR: test\n");
|
||||
}
|
||||
|
||||
} // namespace Carbon
|
||||
Reference in New Issue
Block a user