From 8d9ac166d981ed6fae2529de74024dba4adf1dc4 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Fri, 7 Aug 2009 06:55:53 +0000 Subject: [PATCH] wiki change: adds EXPECT_DEATH_IF_SUPPORTED --- wiki/GoogleTestAdvancedGuide.wiki | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wiki/GoogleTestAdvancedGuide.wiki b/wiki/GoogleTestAdvancedGuide.wiki index fb71b098..1a44674d 100644 --- a/wiki/GoogleTestAdvancedGuide.wiki +++ b/wiki/GoogleTestAdvancedGuide.wiki @@ -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 ==