"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "googletest/test/googletest-death-test_ex_test.cc" between
googletest-release-1.10.0.tar.gz and googletest-release-1.11.0.tar.gz

About: GoogleTest is Google's (unit) testing and mocking framework for C++ tests.

googletest-death-test_ex_test.cc  (googletest-release-1.10.0):googletest-death-test_ex_test.cc  (googletest-release-1.11.0)
skipping to change at line 62 skipping to change at line 62
EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw 1, ""), "threw an exception"); EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw 1, ""), "threw an exception");
} catch (...) { // NOLINT } catch (...) { // NOLINT
FAIL() << "An exception escaped a death test macro invocation " FAIL() << "An exception escaped a death test macro invocation "
<< "with catch_exceptions " << "with catch_exceptions "
<< (testing::GTEST_FLAG(catch_exceptions) ? "enabled" : "disabled"); << (testing::GTEST_FLAG(catch_exceptions) ? "enabled" : "disabled");
} }
} }
class TestException : public std::exception { class TestException : public std::exception {
public: public:
const char* what() const throw() override { return "exceptional message"; } const char* what() const noexcept override { return "exceptional message"; }
}; };
TEST(CxxExceptionDeathTest, PrintsMessageForStdExceptions) { TEST(CxxExceptionDeathTest, PrintsMessageForStdExceptions) {
// Verifies that the exception message is quoted in the failure text. // Verifies that the exception message is quoted in the failure text.
EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw TestException(), ""), EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw TestException(), ""),
"exceptional message"); "exceptional message");
// Verifies that the location is mentioned in the failure text. // Verifies that the location is mentioned in the failure text.
EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw TestException(), ""), EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw TestException(), ""),
__FILE__); __FILE__);
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)