Merge pull request #246 from simartin/ticket_5356

Ticket #5356: Added test case that works following the fix for #5506.
This commit is contained in:
Daniel Marjamäki 2014-03-02 14:55:52 +01:00
commit 31755b621c
1 changed files with 6 additions and 0 deletions

View File

@ -62,6 +62,7 @@ private:
TEST_CASE(tokenize27); // #4525 (segmentation fault)
TEST_CASE(tokenize28); // #4725 (writing asm() around "^{}")
TEST_CASE(tokenize29); // #5506 (segmentation fault upon invalid code)
TEST_CASE(tokenize30); // #5356 (segmentation fault upon invalid code)
// don't freak out when the syntax is wrong
TEST_CASE(wrong_syntax1);
@ -831,6 +832,11 @@ private:
tokenizeAndStringify("A template < int { int = -1 ; } template < int N > struct B { int [ A < N > :: zero ] ; } ; B < 0 > b ;");
}
// #5356 - segmentation fault upon invalid code
void tokenize30() {
tokenizeAndStringify("struct template<int { = }; > struct B { }; B < 0 > b;");
}
void wrong_syntax1() {
{
const std::string code("TR(kvmpio, PROTO(int rw), ARGS(rw), TP_(aa->rw;))");