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" 11*d6698386SAlex Brachet #include "src/stdlib/exit.h" 12a499d680SAlex Brachet #include "utils/UnitTest/Test.h" 13a499d680SAlex Brachet TEST(LlvmLibcStdlib,_Exit)141df0dbfcSMichael JonesTEST(LlvmLibcStdlib, _Exit) { 15a499d680SAlex Brachet EXPECT_EXITS([] { __llvm_libc::_Exit(1); }, 1); 16a499d680SAlex Brachet EXPECT_EXITS([] { __llvm_libc::_Exit(65); }, 65); 17*d6698386SAlex Brachet 18*d6698386SAlex Brachet EXPECT_EXITS([] { __llvm_libc::exit(1); }, 1); 19*d6698386SAlex Brachet EXPECT_EXITS([] { __llvm_libc::exit(65); }, 65); 20a499d680SAlex Brachet } 21