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