[all-commits] [llvm/llvm-project] 036899: [libc] [UnitTest] Create death tests
Alex Brachet via All-commits
all-commits at lists.llvm.org
Mon Feb 24 14:54:59 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 0368997402ae5f62efc83ec7b6f9052e01916943
https://github.com/llvm/llvm-project/commit/0368997402ae5f62efc83ec7b6f9052e01916943
Author: Alex Brachet <alexbrachetmialot at gmail.com>
Date: 2020-02-24 (Mon, 24 Feb 2020)
Changed paths:
M libc/cmake/modules/LLVMLibCRules.cmake
M libc/test/src/signal/raise_test.cpp
M libc/utils/CMakeLists.txt
M libc/utils/UnitTest/Test.cpp
M libc/utils/UnitTest/Test.h
A libc/utils/testutils/CMakeLists.txt
A libc/utils/testutils/ExecuteFunction.h
A libc/utils/testutils/ExecuteFunctionUnix.cpp
Log Message:
-----------
[libc] [UnitTest] Create death tests
Summary: This patch adds `EXPECT_EXITS` and `EXPECT_DEATH` macros for testing exit codes and deadly signals. They are less convoluted than their analogs in GTEST and don't have matchers but just take an int for either the exit code or the signal respectively. Nor do they have any regex match against the stdout/stderr of the child process.
Reviewers: sivachandra, gchatelet
Reviewed By: sivachandra
Subscribers: mgorny, MaskRay, tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D74665
More information about the All-commits
mailing list