<trclass="memdesc:a415e40b4d538d7421e1b0a43ddd3f83e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps the gtest <code>ASSERT_DEATH_IF_SUPPORTED()</code> macro to make assertions about death caused by crashes. <ahref="#a415e40b4d538d7421e1b0a43ddd3f83e">More...</a><br/></td></tr>
<trclass="memdesc:a496cb27779b2120a1854e81375e9ae5f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps the gtest <code>EXPECT_DEATH_IF_SUPPORTED()</code> macro to make assertions about death caused by crashes. <ahref="#a496cb27779b2120a1854e81375e9ae5f">More...</a><br/></td></tr>
<trclass="memdesc:a11ab1a718cd7a7ed56b7e2fbd2c36f74"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps the <aclass="el"href="gtest__death_8h.html#a415e40b4d538d7421e1b0a43ddd3f83e"title="Wraps the gtest ASSERT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">ASSERT_DEATH_CRASH()</a> macro to make assertions about death caused by <code>CHECK()</code> failures. <ahref="#a11ab1a718cd7a7ed56b7e2fbd2c36f74">More...</a><br/></td></tr>
<trclass="memdesc:aa4bd7e1dbfc8862448a4b0fb66790e50"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps the <aclass="el"href="gtest__death_8h.html#a496cb27779b2120a1854e81375e9ae5f"title="Wraps the gtest EXPECT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">EXPECT_DEATH_CRASH()</a> macro to make assertions about death caused by <code>CHECK()</code> failures. <ahref="#aa4bd7e1dbfc8862448a4b0fb66790e50">More...</a><br/></td></tr>
<p>Wraps the <aclass="el"href="gtest__death_8h.html#a415e40b4d538d7421e1b0a43ddd3f83e"title="Wraps the gtest ASSERT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">ASSERT_DEATH_CRASH()</a> macro to make assertions about death caused by <code>CHECK()</code> failures. </p>
<p>In an in-Chromium build in the official configuration, <code>CHECK()</code> does not print its condition or streamed messages. In that case, this macro uses an empty <em>regex</em> pattern when calling <aclass="el"href="gtest__death_8h.html#a415e40b4d538d7421e1b0a43ddd3f83e"title="Wraps the gtest ASSERT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">ASSERT_DEATH_CRASH()</a> to avoid looking for any particular output on the standard error stream. In other build configurations, the <em>regex</em> pattern is left intact.</p>
<p>On macOS, <code>CHECK()</code> failures normally show up as crashes to the system’s crash reporter, but it is undesirable for intentional <aclass="el"href="gtest__death_8h.html#a11ab1a718cd7a7ed56b7e2fbd2c36f74"title="Wraps the ASSERT_DEATH_CRASH() macro to make assertions about death caused by CHECK() failures...">ASSERT_DEATH_CHECK()</a> crashes to be handled by any crash reporter, so this is implemented in terms of <aclass="el"href="gtest__death_8h.html#a415e40b4d538d7421e1b0a43ddd3f83e"title="Wraps the gtest ASSERT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">ASSERT_DEATH_CRASH()</a> instead of <code>ASSERT_DEATH()</code>.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="gtest__death_8h.html#aa4bd7e1dbfc8862448a4b0fb66790e50"title="Wraps the EXPECT_DEATH_CRASH() macro to make assertions about death caused by CHECK() failures...">EXPECT_DEATH_CHECK()</a></dd></dl>
<b>Value:</b><divclass="fragment"><divclass="line"><spanclass="keywordflow">do</span> { \</div><divclass="line"> crashpad::test::ExceptionSwallower exception_swallower; \</div><divclass="line"> ASSERT_DEATH_IF_SUPPORTED( \</div><divclass="line"><aclass="code"href="classcrashpad_1_1test_1_1ExceptionSwallower.html#af7fdf8f0dca2bb2a34397d58283d3676">crashpad::test::ExceptionSwallower::SwallowExceptions</a>(); \</div><divclass="line"> { statement; }, regex); \</div><divclass="line"> } <spanclass="keywordflow">while</span> (<spanclass="keyword">false</span>)</div><divclass="ttc"id="classcrashpad_1_1test_1_1ExceptionSwallower_html_af7fdf8f0dca2bb2a34397d58283d3676"><divclass="ttname"><ahref="classcrashpad_1_1test_1_1ExceptionSwallower.html#af7fdf8f0dca2bb2a34397d58283d3676">crashpad::test::ExceptionSwallower::SwallowExceptions</a></div><divclass="ttdeci">static void SwallowExceptions()</div><divclass="ttdoc">In a test child process, arranges to swallow EXC_CRASH and EXC_CORPSE_NOTIFY exceptions. </div><divclass="ttdef"><b>Definition:</b> exception_swallower.cc:152</div></div>
</div><!-- fragment -->
<p>Wraps the gtest <code>ASSERT_DEATH_IF_SUPPORTED()</code> macro to make assertions about death caused by crashes. </p>
<p>On macOS, this macro prevents the system’s crash reporter from handling crashes that occur in <em>statement</em>. Crashes are normally visible to the system’s crash reporter, but it is undesirable for intentional <aclass="el"href="gtest__death_8h.html#a415e40b4d538d7421e1b0a43ddd3f83e"title="Wraps the gtest ASSERT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">ASSERT_DEATH_CRASH()</a> crashes to be handled by any crash reporter.</p>
<p><code>ASSERT_DEATH_IF_SUPPORTED()</code> is used instead of <code>ASSERT_DEATH()</code> to support platforms where death tests are not implemented by gtest (e.g. Fuchsia). On platforms where death tests are not implemented, a warning will be logged and the remainder of the test body skipped.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="gtest__death_8h.html#a11ab1a718cd7a7ed56b7e2fbd2c36f74"title="Wraps the ASSERT_DEATH_CRASH() macro to make assertions about death caused by CHECK() failures...">ASSERT_DEATH_CHECK()</a></dd>
<dd>
<aclass="el"href="gtest__death_8h.html#a496cb27779b2120a1854e81375e9ae5f"title="Wraps the gtest EXPECT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">EXPECT_DEATH_CRASH()</a></dd></dl>
<p>Wraps the <aclass="el"href="gtest__death_8h.html#a496cb27779b2120a1854e81375e9ae5f"title="Wraps the gtest EXPECT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">EXPECT_DEATH_CRASH()</a> macro to make assertions about death caused by <code>CHECK()</code> failures. </p>
<p>In an in-Chromium build in the official configuration, <code>CHECK()</code> does not print its condition or streamed messages. In that case, this macro uses an empty <em>regex</em> pattern when calling <aclass="el"href="gtest__death_8h.html#a496cb27779b2120a1854e81375e9ae5f"title="Wraps the gtest EXPECT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">EXPECT_DEATH_CRASH()</a> to avoid looking for any particular output on the standard error stream. In other build configurations, the <em>regex</em> pattern is left intact.</p>
<p>On macOS, <code>CHECK()</code> failures normally show up as crashes to the system’s crash reporter, but it is undesirable for intentional <aclass="el"href="gtest__death_8h.html#aa4bd7e1dbfc8862448a4b0fb66790e50"title="Wraps the EXPECT_DEATH_CRASH() macro to make assertions about death caused by CHECK() failures...">EXPECT_DEATH_CHECK()</a> crashes to be handled by any crash reporter, so this is implemented in terms of <aclass="el"href="gtest__death_8h.html#a496cb27779b2120a1854e81375e9ae5f"title="Wraps the gtest EXPECT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">EXPECT_DEATH_CRASH()</a> instead of <code>EXPECT_DEATH()</code>.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="gtest__death_8h.html#a11ab1a718cd7a7ed56b7e2fbd2c36f74"title="Wraps the ASSERT_DEATH_CRASH() macro to make assertions about death caused by CHECK() failures...">ASSERT_DEATH_CHECK()</a></dd></dl>
<b>Value:</b><divclass="fragment"><divclass="line"><spanclass="keywordflow">do</span> { \</div><divclass="line"> crashpad::test::ExceptionSwallower exception_swallower; \</div><divclass="line"> EXPECT_DEATH(<aclass="code"href="classcrashpad_1_1test_1_1ExceptionSwallower.html#af7fdf8f0dca2bb2a34397d58283d3676">crashpad::test::ExceptionSwallower::SwallowExceptions</a>(); \</div><divclass="line"> { statement; }, \</div><divclass="line"> regex); \</div><divclass="line"> } <spanclass="keywordflow">while</span> (<spanclass="keyword">false</span>)</div><divclass="ttc"id="classcrashpad_1_1test_1_1ExceptionSwallower_html_af7fdf8f0dca2bb2a34397d58283d3676"><divclass="ttname"><ahref="classcrashpad_1_1test_1_1ExceptionSwallower.html#af7fdf8f0dca2bb2a34397d58283d3676">crashpad::test::ExceptionSwallower::SwallowExceptions</a></div><divclass="ttdeci">static void SwallowExceptions()</div><divclass="ttdoc">In a test child process, arranges to swallow EXC_CRASH and EXC_CORPSE_NOTIFY exceptions. </div><divclass="ttdef"><b>Definition:</b> exception_swallower.cc:152</div></div>
</div><!-- fragment -->
<p>Wraps the gtest <code>EXPECT_DEATH_IF_SUPPORTED()</code> macro to make assertions about death caused by crashes. </p>
<p>On macOS, this macro prevents the system’s crash reporter from handling crashes that occur in <em>statement</em>. Crashes are normally visible to the system’s crash reporter, but it is undesirable for intentional <aclass="el"href="gtest__death_8h.html#a496cb27779b2120a1854e81375e9ae5f"title="Wraps the gtest EXPECT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">EXPECT_DEATH_CRASH()</a> crashes to be handled by any crash reporter.</p>
<p><code>EXPECT_DEATH_IF_SUPPORTED()</code> is used instead of <code>EXPECT_DEATH()</code> to support platforms where death tests are not implemented by gtest (e.g. Fuchsia). On platforms where death tests are not implemented, a warning will be logged and the remainder of the test body skipped.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="gtest__death_8h.html#aa4bd7e1dbfc8862448a4b0fb66790e50"title="Wraps the EXPECT_DEATH_CRASH() macro to make assertions about death caused by CHECK() failures...">EXPECT_DEATH_CHECK()</a></dd>
<dd>
<aclass="el"href="gtest__death_8h.html#a415e40b4d538d7421e1b0a43ddd3f83e"title="Wraps the gtest ASSERT_DEATH_IF_SUPPORTED() macro to make assertions about death caused by crashes...">ASSERT_DEATH_CRASH()</a></dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hrclass="footer"/><addressclass="footer"><small>
Generated by  <ahref="http://www.doxygen.org/index.html">