From 4b249877f1e2c1ca10a156d291676ca5f182f594 Mon Sep 17 00:00:00 2001 From: amai2012 Date: Mon, 10 Sep 2018 08:40:53 +0200 Subject: [PATCH] #8709 Add stability regression test --- test/testgarbage.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/testgarbage.cpp b/test/testgarbage.cpp index 8000b9e2d..1658005d2 100644 --- a/test/testgarbage.cpp +++ b/test/testgarbage.cpp @@ -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