From b51e4dfeea75d7ac65d93c957858f4adba59784b Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 27 Mar 2020 19:11:38 +0300 Subject: [PATCH] Improved test to have all lines reached --- test/testpreprocessor.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index 564b07588..905c76db3 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -1899,17 +1899,9 @@ private: // cases should be fixed whenever this other bug is fixed ASSERT_EQUALS(2U, actual.size()); - if (actual.find("A") == actual.end()) { - ASSERT_EQUALS("A is checked", "failed"); - } else { - ASSERT_EQUALS("A is checked", "A is checked"); - } + ASSERT_EQUALS_MSG(true, (actual.find("A") != actual.end()), "A is expected to be checked but it was not checked"); - if (actual.find("A;A;B") != actual.end()) { - ASSERT_EQUALS("A;A;B is NOT checked", "failed"); - } else { - ASSERT_EQUALS("A;A;B is NOT checked", "A;A;B is NOT checked"); - } + ASSERT_EQUALS_MSG(true, (actual.find("A;A;B") == actual.end()), "A;A;B is expected to NOT be checked but it was checked"); } void invalid_define_1() {