diff --git a/tests/test_SubItemValuePerItem.cpp b/tests/test_SubItemValuePerItem.cpp index 08d421fc1333ae8344402f9806446ab22c8de3b4..65741d70089785bb58b34230569afcd33a961c62 100644 --- a/tests/test_SubItemValuePerItem.cpp +++ b/tests/test_SubItemValuePerItem.cpp @@ -63,7 +63,8 @@ TEST_CASE("SubItemValuePerItem", "[mesh]") }; auto check_same_memory = [](const auto& sub_item_value_per_item, auto array) { - REQUIRE(sub_item_value_per_item.numberOfValues() == array.size()); + const bool same_size = (sub_item_value_per_item.numberOfValues() == array.size()); + REQUIRE(same_size); bool is_same = true; for (size_t i = 0; i < sub_item_value_per_item.numberOfValues(); ++i) { is_same &= (&(sub_item_value_per_item[i]) == &(array[i]));