[unit-tests] squash some warnings
ASSERT_THAT(), defined in google-test needs to be wrapped in braces if it's the only statement in an if block (dangling else).
This commit is contained in:
parent
65264911c1
commit
acf2e6e625
@ -159,13 +159,15 @@ TEST_F(ArrayTests, grow)
|
||||
create_array(0, 123);
|
||||
|
||||
for (unsigned i = 1; i < chunks.size(); i++) {
|
||||
if (i > 1)
|
||||
if (i > 1) {
|
||||
ASSERT_THAT(get(chunks[i - 1] - 1), Eq(i - 1));
|
||||
}
|
||||
|
||||
a_->grow(chunks[i], i);
|
||||
|
||||
if (i > 1)
|
||||
if (i > 1) {
|
||||
ASSERT_THAT(get(chunks[i - 1] - 1), Eq(i - 1));
|
||||
}
|
||||
|
||||
for (unsigned j = chunks[i - 1]; j < chunks[i]; j++)
|
||||
ASSERT_THAT(get(j), Eq(i));
|
||||
|
@ -144,8 +144,9 @@ namespace {
|
||||
if (!b)
|
||||
break;
|
||||
|
||||
if (b)
|
||||
if (b) {
|
||||
ASSERT_TRUE(*b != *mb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user