[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:
Joe Thornber 2019-05-27 09:19:14 +01:00
parent 65264911c1
commit acf2e6e625
3 changed files with 7 additions and 4 deletions

View File

@ -1 +1 @@
0.8.1
0.8.2

View File

@ -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));

View File

@ -144,10 +144,11 @@ namespace {
if (!b)
break;
if (b)
if (b) {
ASSERT_TRUE(*b != *mb);
}
}
}
void test_set_count(space_map::ptr sm) {
sm->set_count(43, 5);