Skip to content

Commit b51e4df

Browse files
committed
Improved test to have all lines reached
1 parent 326d6fb commit b51e4df

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

test/testpreprocessor.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,17 +1899,9 @@ class TestPreprocessor : public TestFixture {
18991899
// cases should be fixed whenever this other bug is fixed
19001900
ASSERT_EQUALS(2U, actual.size());
19011901

1902-
if (actual.find("A") == actual.end()) {
1903-
ASSERT_EQUALS("A is checked", "failed");
1904-
} else {
1905-
ASSERT_EQUALS("A is checked", "A is checked");
1906-
}
1902+
ASSERT_EQUALS_MSG(true, (actual.find("A") != actual.end()), "A is expected to be checked but it was not checked");
19071903

1908-
if (actual.find("A;A;B") != actual.end()) {
1909-
ASSERT_EQUALS("A;A;B is NOT checked", "failed");
1910-
} else {
1911-
ASSERT_EQUALS("A;A;B is NOT checked", "A;A;B is NOT checked");
1912-
}
1904+
ASSERT_EQUALS_MSG(true, (actual.find("A;A;B") == actual.end()), "A;A;B is expected to NOT be checked but it was checked");
19131905
}
19141906

19151907
void invalid_define_1() {

0 commit comments

Comments
 (0)