#8709 Add stability regression test

This commit is contained in:
amai2012 2018-09-10 08:40:53 +02:00
parent 0dfedd977e
commit 4b249877f1
1 changed files with 11 additions and 0 deletions

View File

@ -225,6 +225,7 @@ private:
TEST_CASE(garbageCode192); // #8386 (segmentation fault)
TEST_CASE(garbageCode193); // #8740
TEST_CASE(garbageCode194); // #8384
TEST_CASE(garbageCode195); // #8709
TEST_CASE(garbageCodeFuzzerClientMode1); // test cases created with the fuzzer client, mode 1
@ -1505,6 +1506,16 @@ private:
ASSERT_THROW(checkCode("{((()))(return 1||);}"), InternalError);
}
// #8709 - no garbarge but to avoid stability regression
void garbageCode195() {
checkCode("a b;\n"
"void c() {\n"
" switch (d) { case b:; }\n"
" double e(b);\n"
" if(e <= 0) {}\n"
"}");
}
void syntaxErrorFirstToken() {
ASSERT_THROW(checkCode("&operator(){[]};"), InternalError); // #7818
ASSERT_THROW(checkCode("*(*const<> (size_t); foo) { } *(*const (size_t)() ; foo) { }"), InternalError); // #6858