wiki change: adds EXPECT_DEATH_IF_SUPPORTED

This commit is contained in:
zhanyong.wan 2009-08-07 06:55:53 +00:00
parent 280294e3e1
commit 8d9ac166d9

View file

@ -348,7 +348,8 @@ If you want to test `EXPECT_*()/ASSERT_*()` failures in your test code, see [#Ca
Google Test has the following macros to support death tests:
|| *Fatal assertion* || *Nonfatal assertion* || *Verifies* ||
|| `ASSERT_DEATH(`_statement, regex_`); || `EXPECT_DEATH(`_statement, regex_`); || _statement_ crashes with the given error ||
|| `ASSERT_DEATH(`_statement, regex_`); || `EXPECT_DEATH(`_statement, regex_`); || _statement_ crashes with the given error ||
|| `ASSERT_DEATH_IF_SUPPORTED(`_statement, regex_`); || `EXPECT_DEATH_IF_SUPPORTED(`_statement, regex_`); || if death tests are supported, verifies that _statement_ crashes with the given error; otherwise verifies nothing ||
|| `ASSERT_EXIT(`_statement, predicate, regex_`); || `EXPECT_EXIT(`_statement, predicate, regex_`); ||_statement_ exits with the given error and its exit code matches _predicate_ ||
where _statement_ is a statement that is expected to cause the process to
@ -437,7 +438,7 @@ TEST_F(FooDeathTest, DoesThat) {
}
}}}
_Availability:_ Linux, Windows (requires MSVC 8.0 or above), Cygwin, and Mac (the latter three are supported since v1.3.0)
_Availability:_ Linux, Windows (requires MSVC 8.0 or above), Cygwin, and Mac (the latter three are supported since v1.3.0). `(ASSERT|EXPECT)_DEATH_IF_SUPPORTED` are new in v1.4.0.
== Regular Expression Syntax ==