title: Difference between expect_fatal_failure & plain assertion
body: <p>First, I'm so sorry for my bad English.</p>
  
  <p>In github of Google Test, it explains expect_fatal_failure assertions this way :</p>
  
  <blockquote>
    <p>EXPECT_FATAL_FAILURE(statement, substring); to assert that statement
    generates a fatal (e.g. ASSERT_*) failure whose message contains the
    given substring</p>
  </blockquote>
  
  <p>But when I ran my project of expect_fatal_failure, I couldn't find difference between executing statement with EXPECT_NONFATAL_FAILURE(statement, substring) &amp; just executing statement</p>
  
  <p>here is my code,</p>
  
  <pre><code>#include "gtest/gtest.h"
  #include "gtest/gtest-spi.h"
  
  void failTwice()
  {
     EXPECT_TRUE(false) &lt;&lt; "fail first time";
     ASSERT_TRUE(false) &lt;&lt; "fail second time";
  }
  
  TEST(FailureTest, FirstTest)
  {
     EXPECT_NONFATAL_FAILURE(failTwice(), "time");
     failTwice();
  }
  
  TEST(FailureTest, SecondTest)
  {
     EXPECT_NONFATAL_FAILURE(failTwice(), "second");
     failTwice();
  }
  
  int main(int argc, char* argv[])
  {
      testing::InitGoogleTest(&amp;argc, argv);
      return RUN_ALL_TESTS();
  }
  </code></pre>
  
  <p>and result is in image.</p>
  
  <p><img src="https://i.stack.imgur.com/NfhHG.png" alt="result"></p>
  
  <p>Is there anything wrong the way I did?</p>
  
  <p>or there aren't any difference between them?</p>