diff options
| author | Alex Brachet <alexbrachetmialot@gmail.com> | 2020-03-05 14:21:18 -0500 |
|---|---|---|
| committer | Alex Brachet <alexbrachetmialot@gmail.com> | 2020-03-05 14:21:18 -0500 |
| commit | a499d6805664350095658878e25f6ae20a106748 (patch) | |
| tree | 51b9d4e29320bef530f6abb633103d2be01e9a6f /libc/test/src/stdlib/_Exit_test.cpp | |
| parent | ef4282e0ee2d6539bbb92447a7464d9d089409f1 (diff) | |
[libc] Create abort and _Exit
This revision creates abort and _Exit implementations
Differential Revision: https://reviews.llvm.org/D74949
Diffstat (limited to 'libc/test/src/stdlib/_Exit_test.cpp')
| -rw-r--r-- | libc/test/src/stdlib/_Exit_test.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libc/test/src/stdlib/_Exit_test.cpp b/libc/test/src/stdlib/_Exit_test.cpp new file mode 100644 index 000000000000..49878bfd506e --- /dev/null +++ b/libc/test/src/stdlib/_Exit_test.cpp @@ -0,0 +1,16 @@ +//===----------------------- Unittests for _Exit --------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "include/stdlib.h" +#include "src/stdlib/_Exit.h" +#include "utils/UnitTest/Test.h" + +TEST(Stdlib, _Exit) { + EXPECT_EXITS([] { __llvm_libc::_Exit(1); }, 1); + EXPECT_EXITS([] { __llvm_libc::_Exit(65); }, 65); +} |
