166d00febSPaula Toth //===-- Unittests for _Exit -----------------------------------------------===// 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/stdlib.h" 10a499d680SAlex Brachet #include "src/stdlib/_Exit.h" 11a499d680SAlex Brachet #include "utils/UnitTest/Test.h" 12a499d680SAlex Brachet 13*1df0dbfcSMichael Jones TEST(LlvmLibcStdlib, _Exit) { 14a499d680SAlex Brachet EXPECT_EXITS([] { __llvm_libc::_Exit(1); }, 1); 15a499d680SAlex Brachet EXPECT_EXITS([] { __llvm_libc::_Exit(65); }, 65); 16a499d680SAlex Brachet } 17