Fix EXPECT_DEATH() and ASSERT_DEATH() triggering -Wcovered-switch-default

EXPECT_DEATH() and ASSERT_DEATH() have a switch case where every
possible case is covered. This makes the default case unnecessary
and triggers -Wcovered-switch-default.
Due to these being macros, the lines are expanded in user code and
are thus subject to warnings of the target codebase.

Fixes #3456
This commit is contained in:
Alex Karatarakis 2021-06-23 14:57:22 -07:00
parent 355d57d90d
commit 1008850435

View File

@ -236,8 +236,6 @@ inline Matcher<const ::std::string&> MakeDeathTestMatcher(
gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \
break; \
} \
default: \
break; \
} \
} \
} else \