gtest: Supress warning about set unused variable
Modified test ExpectThrowTest.DoesNotGenerateUnreachableCodeWarning
This commit is contained in:
parent
40412d8512
commit
2f83a6e8f8
@ -4109,7 +4109,7 @@ TEST(AssertionSyntaxTest, BasicAssertionsBehavesLikeSingleStatement) {
|
||||
// Tests that the compiler will not complain about unreachable code in the
|
||||
// EXPECT_THROW/EXPECT_ANY_THROW/EXPECT_NO_THROW macros.
|
||||
TEST(ExpectThrowTest, DoesNotGenerateUnreachableCodeWarning) {
|
||||
int n = 0;
|
||||
[[maybe_unused]] int n{0};
|
||||
|
||||
EXPECT_THROW(throw 1, int);
|
||||
EXPECT_NONFATAL_FAILURE(EXPECT_THROW(n++, int), "");
|
||||
|
Loading…
Reference in New Issue
Block a user