1 //===-- Unittests for abort -----------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "include/signal.h" 10 #include "include/stdlib.h" 11 #include "src/stdlib/abort.h" 12 #include "utils/UnitTest/Test.h" 13 TEST(Stdlib,abort)14TEST(Stdlib, abort) { 15 // -1 matches against any signal, which is necessary for now until 16 // __llvm_libc::abort() unblocks SIGABRT. 17 EXPECT_DEATH([] { __llvm_libc::abort(); }, -1); 18 } 19