[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);
|
create_array(0, 123);
|
||||||
|
|
||||||
for (unsigned i = 1; i < chunks.size(); i++) {
|
for (unsigned i = 1; i < chunks.size(); i++) {
|
||||||
if (i > 1)
|
if (i > 1) {
|
||||||
ASSERT_THAT(get(chunks[i - 1] - 1), Eq(i - 1));
|
ASSERT_THAT(get(chunks[i - 1] - 1), Eq(i - 1));
|
||||||
|
}
|
||||||
|
|
||||||
a_->grow(chunks[i], i);
|
a_->grow(chunks[i], i);
|
||||||
|
|
||||||
if (i > 1)
|
if (i > 1) {
|
||||||
ASSERT_THAT(get(chunks[i - 1] - 1), Eq(i - 1));
|
ASSERT_THAT(get(chunks[i - 1] - 1), Eq(i - 1));
|
||||||
|
}
|
||||||
|
|
||||||
for (unsigned j = chunks[i - 1]; j < chunks[i]; j++)
|
for (unsigned j = chunks[i - 1]; j < chunks[i]; j++)
|
||||||
ASSERT_THAT(get(j), Eq(i));
|
ASSERT_THAT(get(j), Eq(i));
|
||||||
|
@ -144,10 +144,11 @@ namespace {
|
|||||||
if (!b)
|
if (!b)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (b)
|
if (b) {
|
||||||
ASSERT_TRUE(*b != *mb);
|
ASSERT_TRUE(*b != *mb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void test_set_count(space_map::ptr sm) {
|
void test_set_count(space_map::ptr sm) {
|
||||||
sm->set_count(43, 5);
|
sm->set_count(43, 5);
|
||||||
|
Loading…
Reference in New Issue
Block a user