From acf2e6e6255a5ab22d11a936c958a5a2341d9e0a Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 27 May 2019 09:19:14 +0100 Subject: [PATCH] [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). --- VERSION | 2 +- unit-tests/array_t.cc | 6 ++++-- unit-tests/space_map_t.cc | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 6f4eebd..100435b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.1 +0.8.2 diff --git a/unit-tests/array_t.cc b/unit-tests/array_t.cc index 74fac04..0e5cf15 100644 --- a/unit-tests/array_t.cc +++ b/unit-tests/array_t.cc @@ -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)); diff --git a/unit-tests/space_map_t.cc b/unit-tests/space_map_t.cc index d11de47..5ee8b30 100644 --- a/unit-tests/space_map_t.cc +++ b/unit-tests/space_map_t.cc @@ -144,8 +144,9 @@ namespace { if (!b) break; - if (b) + if (b) { ASSERT_TRUE(*b != *mb); + } } }