Added testcase for #807 (cppcheck crashes scanning ruby 1.9.1)

This commit is contained in:
Daniel Marjamäki 2009-10-10 10:13:56 +02:00
parent b212d77b7c
commit b67fe861b8
1 changed files with 8 additions and 0 deletions

View File

@ -81,6 +81,7 @@ private:
TEST_CASE(simplifyKnownVariables13); TEST_CASE(simplifyKnownVariables13);
TEST_CASE(simplifyKnownVariables14); TEST_CASE(simplifyKnownVariables14);
TEST_CASE(simplifyKnownVariables15); TEST_CASE(simplifyKnownVariables15);
TEST_CASE(simplifyKnownVariables16);
TEST_CASE(match1); TEST_CASE(match1);
@ -829,6 +830,13 @@ private:
} }
} }
void simplifyKnownVariables16()
{
// ticket #807 - segmentation fault when macro isn't found
const char code[] = "void f ( ) { int n = 1; DISPATCH(while); }";
simplifyKnownVariables(code);
}
void match1() void match1()
{ {
// Match "%var% | %var%" // Match "%var% | %var%"