@@ -498,6 +498,7 @@ class TestGarbage : public TestFixture {
498498
499499 void garbageCode16 () {
500500 checkCode (" { } A() { delete }" ); // #6080
501+ ignore_errout (); // we do not care about the output
501502 }
502503
503504 void garbageCode17 () {
@@ -563,6 +564,7 @@ class TestGarbage : public TestFixture {
563564 " case struct Tree : break;\n "
564565 " }\n "
565566 " }" ), SYNTAX);
567+ ignore_errout (); // we do not care about the output
566568 }
567569
568570 void garbageCode26 () {
@@ -633,10 +635,12 @@ class TestGarbage : public TestFixture {
633635 void garbageCode37 () {
634636 // #5166 segmentation fault (invalid code) in lib/checkother.cpp:329 ( void * f { } void b ( ) { * f } )
635637 checkCode (" void * f { } void b ( ) { * f }" );
638+ ignore_errout (); // we do not care about the output
636639 }
637640
638641 void garbageCode38 () { // Ticket #6666
639642 checkCode (" { f2 { } } void f3 () { delete[] } { }" );
643+ ignore_errout (); // we do not care about the output
640644 }
641645
642646 void garbageCode40 () { // #6620
@@ -1222,6 +1226,7 @@ class TestGarbage : public TestFixture {
12221226 " for (j = 0; j < 1; j)\n "
12231227 " j6;\n "
12241228 " }" );
1229+ ignore_errout (); // we do not care about the output
12251230 }
12261231
12271232 void garbageCode150 () { // #7089
@@ -1441,6 +1446,7 @@ class TestGarbage : public TestFixture {
14411446 void garbageCode168 () {
14421447 // 7246
14431448 checkCode (" long foo(void) { return *bar; }" , false );
1449+ ignore_errout (); // we do not care about the output
14441450 }
14451451
14461452 void garbageCode169 () {
@@ -1581,6 +1587,7 @@ class TestGarbage : public TestFixture {
15811587 " double e(b);\n "
15821588 " if(e <= 0) {}\n "
15831589 " }" );
1590+ ignore_errout (); // we do not care about the output
15841591 }
15851592
15861593 // #8265
@@ -1607,6 +1614,7 @@ class TestGarbage : public TestFixture {
16071614 // #8752
16081615 void garbageCode199 () {
16091616 checkCode (" d f(){e n00e0[]n00e0&" " 0+f=0}" );
1617+ ignore_errout (); // we do not care about the output
16101618 }
16111619
16121620 // #8757
@@ -1623,6 +1631,7 @@ class TestGarbage : public TestFixture {
16231631 void garbageCode202 () {
16241632 ASSERT_THROW_INTERNAL (checkCode (" void f() { UNKNOWN_MACRO(return); }" ), UNKNOWN_MACRO);
16251633 ASSERT_THROW_INTERNAL (checkCode (" void f() { UNKNOWN_MACRO(throw); }" ), UNKNOWN_MACRO);
1634+ ignore_errout ();
16261635 }
16271636
16281637 void garbageCode203 () { // #8972
@@ -1735,7 +1744,9 @@ class TestGarbage : public TestFixture {
17351744 }
17361745 void garbageCode224 () {
17371746 ASSERT_THROW_INTERNAL (checkCode (" void f(){ auto* b = dynamic_cast<const }" ), SYNTAX); // don't crash
1747+ ASSERT_EQUALS (" " , errout_str ());
17381748 ASSERT_THROW_INTERNAL (checkCode (" void f(){ auto* b = dynamic_cast x; }" ), SYNTAX);
1749+ ignore_errout ();
17391750 }
17401751 void garbageCode225 () {
17411752 ASSERT_THROW_INTERNAL (checkCode (" int n() { c * s0, 0 s0 = c(sizeof = ) }" ), SYNTAX);
@@ -1859,6 +1870,7 @@ class TestGarbage : public TestFixture {
18591870 " void f() {\n "
18601871 " auto fn = []() -> foo* { return new foo(); };\n "
18611872 " }" );
1873+ ignore_errout (); // we do not care about the output
18621874 }
18631875};
18641876
0 commit comments