summaryrefslogtreecommitdiffstats
path: root/googletest/test
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-09-04 21:27:33 (GMT)
committerGennadiy Civil <misterg@google.com>2018-09-06 12:47:43 (GMT)
commit0d2262138c63e8c5ae8f00286e016e4df5e716be (patch)
treeeb48277d5c71ab2c740ff363daf3fa1ffdd0ad37 /googletest/test
parentdbd55366c8b010b558795223db6036747eb1c388 (diff)
downloadgoogletest-0d2262138c63e8c5ae8f00286e016e4df5e716be.zip
googletest-0d2262138c63e8c5ae8f00286e016e4df5e716be.tar.gz
googletest-0d2262138c63e8c5ae8f00286e016e4df5e716be.tar.bz2
Googletest export
Make EXPECT_THROW print the actual exception type on the "threw the wrong exception type" case if the actual exception is a std::exception PiperOrigin-RevId: 211524592
Diffstat (limited to 'googletest/test')
-rw-r--r--googletest/test/gtest_unittest.cc9
1 files changed, 0 insertions, 9 deletions
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index 3965f46..f7213fb 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -4541,21 +4541,12 @@ TEST(ExpectTest, EXPECT_THROW) {
EXPECT_NONFATAL_FAILURE(EXPECT_THROW(ThrowAnInteger(), bool),
"Expected: ThrowAnInteger() throws an exception of "
"type bool.\n Actual: it throws a different type.");
- std::string expected = "what() arg";
- EXPECT_NONFATAL_FAILURE(EXPECT_THROW(throw std::out_of_range(expected), bool),
- expected);
EXPECT_NONFATAL_FAILURE(
EXPECT_THROW(ThrowNothing(), bool),
"Expected: ThrowNothing() throws an exception of type bool.\n"
" Actual: it throws nothing.");
}
-// We need to make sure always to avoid having multiple blocks which catch a
-// std::exception
-TEST(ExpectTest, EXPECT_THROW_STD_EXCEPTION) {
- EXPECT_THROW(throw std::exception(), std::exception);
-}
-
// Tests EXPECT_NO_THROW.
TEST(ExpectTest, EXPECT_NO_THROW) {
EXPECT_NO_THROW(ThrowNothing());