Added a regression test for ticket #6832.

This commit is contained in:
orbitcowboy 2022-02-10 14:13:50 +01:00
parent 24e9859158
commit 65c0ef8eb0
1 changed files with 4 additions and 0 deletions

View File

@ -250,6 +250,7 @@ private:
TEST_CASE(garbageCode217); // #10011
TEST_CASE(garbageCode218); // #8763
TEST_CASE(garbageCode219); // #10101
TEST_CASE(garbageCode220); // #6832
TEST_CASE(garbageCodeFuzzerClientMode1); // test cases created with the fuzzer client, mode 1
@ -1701,6 +1702,9 @@ private:
" f & = (func)42;\n"
"}\n"); // don't crash
}
void garbageCode220() { // #6832
ASSERT_THROW(checkCode("(){(){{()}}return;{switch()0 case(){}break;l:()}}\n"), InternalError); // don't crash
}
void syntaxErrorFirstToken() {
ASSERT_THROW(checkCode("&operator(){[]};"), InternalError); // #7818