Fix testrunner

This commit is contained in:
Daniel Marjamäki 2017-09-16 02:13:48 +02:00
parent 2e6d78bd08
commit fe0a514a7c
3 changed files with 7 additions and 11 deletions

View File

@ -1485,7 +1485,8 @@ private:
void syntaxErrorCase() { void syntaxErrorCase() {
// case must be inside switch block // case must be inside switch block
ASSERT_THROW(checkCode("void f() { switch (a) {}; case 1: }"), InternalError); ASSERT_THROW(checkCode("void f() { switch (a) {}; case 1: }"), InternalError); // #8184
ASSERT_THROW(checkCode("struct V : { public case {} ; struct U : U void { V *f (int x) (x) } }"), InternalError); // #5120
} }
void enumTrailingComma() { void enumTrailingComma() {

View File

@ -251,7 +251,6 @@ private:
TEST_CASE(symboldatabase36); // ticket #4892 (segmentation fault) TEST_CASE(symboldatabase36); // ticket #4892 (segmentation fault)
TEST_CASE(symboldatabase37); TEST_CASE(symboldatabase37);
TEST_CASE(symboldatabase38); // ticket #5125 (infinite recursion) TEST_CASE(symboldatabase38); // ticket #5125 (infinite recursion)
TEST_CASE(symboldatabase39); // ticket #5120 (infinite recursion)
TEST_CASE(symboldatabase40); // ticket #5153 TEST_CASE(symboldatabase40); // ticket #5153
TEST_CASE(symboldatabase41); // ticket #5197 (unknown macro) TEST_CASE(symboldatabase41); // ticket #5197 (unknown macro)
TEST_CASE(symboldatabase42); // only put variables in variable list TEST_CASE(symboldatabase42); // only put variables in variable list
@ -2500,10 +2499,6 @@ private:
"};"); "};");
} }
void symboldatabase39() { // ticket #5120
check("struct V : { public case {} ; struct U : U void { V *f (int x) (x) } }");
}
void symboldatabase40() { // ticket #5153 void symboldatabase40() { // ticket #5153
check("void f() {\n" check("void f() {\n"
" try { }\n" " try { }\n"

View File

@ -7913,12 +7913,12 @@ private:
} }
void simplifyCaseRange() { void simplifyCaseRange() {
ASSERT_EQUALS("void f ( ) { case 1 : case 2 : case 3 : case 4 : ; }", tokenizeAndStringify("void f() { case 1 ... 4: }")); ASSERT_EQUALS("void f ( ) { switch ( x ) { case 1 : case 2 : case 3 : case 4 : ; } }", tokenizeAndStringify("void f() { switch(x) { case 1 ... 4: } }"));
ASSERT_EQUALS("void f ( ) { case 4 . . . 1 : ; }", tokenizeAndStringify("void f() { case 4 ... 1: }")); ASSERT_EQUALS("void f ( ) { switch ( x ) { case 4 . . . 1 : ; } }", tokenizeAndStringify("void f() { switch(x) { case 4 ... 1: } }"));
tokenizeAndStringify("void f() { case 1 ... 1000000: }"); // Do not run out of memory tokenizeAndStringify("void f() { switch(x) { case 1 ... 1000000: } }"); // Do not run out of memory
ASSERT_EQUALS("void f ( ) { case 'a' : case 'b' : case 'c' : ; }", tokenizeAndStringify("void f() { case 'a' ... 'c': }")); ASSERT_EQUALS("void f ( ) { switch ( x ) { case 'a' : case 'b' : case 'c' : ; } }", tokenizeAndStringify("void f() { switch(x) { case 'a' ... 'c': } }"));
ASSERT_EQUALS("void f ( ) { case 'c' . . . 'a' : ; }", tokenizeAndStringify("void f() { case 'c' ... 'a': }")); ASSERT_EQUALS("void f ( ) { switch ( x ) { case 'c' . . . 'a' : ; } }", tokenizeAndStringify("void f() { switch(x) { case 'c' ... 'a': } }"));
} }
void prepareTernaryOpForAST() { void prepareTernaryOpForAST() {