Skip to content

Commit 9749032

Browse files
Leander SchultenLeander Schulten
authored andcommitted
note that it ok get get an result for an invalid expression
1 parent ce96fef commit 9749032

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/testimportproject.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,8 @@ class TestImportProject : public TestFixture {
710710
ASSERT_THROW_EQUALS(cppcheck::testing::evaluateVcxprojCondition("''", "", ""), std::runtime_error, "Invalid condition: ''''");
711711
ASSERT_THROW_EQUALS(cppcheck::testing::evaluateVcxprojCondition("'' == '", "", ""), std::runtime_error, "Can not tokenize condition");
712712
ASSERT_THROW_EQUALS(cppcheck::testing::evaluateVcxprojCondition("$(Configuration.Lower())", "", ""), std::runtime_error, "Missing operator");
713-
ASSERT_THROW_EQUALS(cppcheck::testing::evaluateVcxprojCondition("' ' && ' '", "", ""), std::runtime_error, "Missing operator");
713+
// invalid expression in => no error. We are ok with that as long as we don't crash
714+
ASSERT(!cppcheck::testing::evaluateVcxprojCondition("' ' && ' '", "", ""));
714715
}
715716

716717
// TODO: test fsParseCommand()

0 commit comments

Comments
 (0)