mirror of
https://github.com/google/googletest.git
synced 2025-04-06 22:15:01 +00:00
Edited wiki page through web user interface.
This commit is contained in:
parent
fd48c29ab6
commit
eddf4bc582
1 changed files with 8 additions and 0 deletions
|
@ -380,6 +380,14 @@ The `*_DEATH` macros are convenient wrappers for `*_EXIT` that use a predicate
|
|||
that verifies that the process either exited with a nonzero exit code or was
|
||||
killed by a signal.
|
||||
|
||||
Note that a death test only cares about three things:
|
||||
|
||||
# does _statement_ abort or exit the process?
|
||||
# (in the case of `ASSERT_EXIT` and `EXPECT_EXIT`) does the exit status satisfy _predicate_? And
|
||||
# does the stderr output match _regex_?
|
||||
|
||||
In particular, if _statement_ generates an `ASSERT_*` or `EXPECT_*` failure, it will *not* cause the death test to fail, as Google Test assertions don't abort the process.
|
||||
|
||||
To write a death test, simply use one of the above macros inside your test
|
||||
function. For example,
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue