diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 2612b4637..ea54760c6 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -81,6 +81,7 @@ private: TEST_CASE(simplifyKnownVariables13); TEST_CASE(simplifyKnownVariables14); TEST_CASE(simplifyKnownVariables15); + TEST_CASE(simplifyKnownVariables16); 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() { // Match "%var% | %var%"