public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/108973] [13 Regression] Sufficiently narrow terminal window causes selftest failure Date: Thu, 02 Mar 2023 08:47:21 +0000 [thread overview] Message-ID: <bug-108973-4-1RYxO9dTfI@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108973-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108973 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Wrapping tests individually for each possible $COLUMNS case would be a maintainance nightmare, e.g. trying to make it work with COLUNMS in [30, 41] inclusive means: --- gcc/diagnostic-show-locus.cc.jj 2023-01-02 09:32:39.783033909 +0100 +++ gcc/diagnostic-show-locus.cc 2023-03-02 09:45:42.432403239 +0100 @@ -4436,7 +4436,7 @@ test_add_location_if_nearby (const line_ /* Test of add_location_if_nearby on the same line as the primary location. */ - { + if (get_terminal_width () > 41) { const location_t missing_close_brace_1_39 = linemap_position_for_line_and_column (line_table, ord_map, 1, 39); const location_t matching_open_brace_1_18 @@ -4501,7 +4501,7 @@ test_diagnostic_show_locus_fixit_lines ( /* A pair of tests for modernizing the initializers to C99-style. */ /* The one-liner case (line 2). */ - { + if (get_terminal_width () > 31) { test_diagnostic_context dc; const location_t x = linemap_position_for_line_and_column (line_table, ord_map, 2, 24); @@ -4521,7 +4521,7 @@ test_diagnostic_show_locus_fixit_lines ( verify that insertion fixit on line 3 is still printed (and that span starts are printed due to the gap between the span at line 3 and that at line 6). */ - { + if (get_terminal_width () > 34) { test_diagnostic_context dc; const location_t y = linemap_position_for_line_and_column (line_table, ord_map, 3, 24); @@ -4543,7 +4543,7 @@ test_diagnostic_show_locus_fixit_lines ( /* As above, but verify the behavior of multiple line spans with line-numbering enabled. */ - { + if (get_terminal_width () > 40) { const location_t y = linemap_position_for_line_and_column (line_table, ord_map, 3, 24); const location_t colon @@ -4756,7 +4756,7 @@ test_overlapped_fixit_printing (const li but for which the *printing* may need consolidation. */ /* Example where 3 fix-it hints are printed as one. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_replace (open_paren, "const_cast<"); @@ -4826,7 +4826,7 @@ test_overlapped_fixit_printing (const li } /* Example where two are consolidated during printing. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_replace (open_paren, "CAST ("); @@ -4843,7 +4843,7 @@ test_overlapped_fixit_printing (const li } /* Example where none are consolidated during printing. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_replace (open_paren, "CST ("); @@ -4860,7 +4860,7 @@ test_overlapped_fixit_printing (const li } /* Example of deletion fix-it hints. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_insert_before (open_paren, "(bar *)"); @@ -4880,7 +4880,7 @@ test_overlapped_fixit_printing (const li } /* Example of deletion fix-it hints that would overlap. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_insert_before (open_paren, "(longer *)"); @@ -4900,7 +4900,7 @@ test_overlapped_fixit_printing (const li } /* Example of insertion fix-it hints that would overlap. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_insert_before (open_paren, "LONGER THAN THE CAST"); @@ -4967,7 +4967,7 @@ test_overlapped_fixit_printing_utf8 (con but for which the *printing* may need consolidation. */ /* Example where 3 fix-it hints are printed as one. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_replace (open_paren, "const_cast<"); @@ -5043,7 +5043,7 @@ test_overlapped_fixit_printing_utf8 (con } /* Example where two are consolidated during printing. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_replace (open_paren, "CAST ("); @@ -5063,7 +5063,7 @@ test_overlapped_fixit_printing_utf8 (con } /* Example where none are consolidated during printing. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_replace (open_paren, "CST ("); @@ -5083,7 +5083,7 @@ test_overlapped_fixit_printing_utf8 (con } /* Example of deletion fix-it hints. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_insert_before (open_paren, "(bar\xf0\x9f\x98\x82 *)"); @@ -5107,7 +5107,7 @@ test_overlapped_fixit_printing_utf8 (con } /* Example of deletion fix-it hints that would overlap. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_insert_before (open_paren, "(long\xf0\x9f\x98\x82 *)"); @@ -5132,7 +5132,7 @@ test_overlapped_fixit_printing_utf8 (con } /* Example of insertion fix-it hints that would overlap. */ - { + if (get_terminal_width () > 30) { test_diagnostic_context dc; rich_location richloc (line_table, expr); richloc.add_fixit_insert_before @@ -5514,7 +5514,7 @@ test_tab_expansion (const line_table_cas /* Confirm the display width was tracked correctly across the internal tab as well. */ - { + if (get_terminal_width () > 36) { test_diagnostic_context dc; dc.tabstop = tabstop; rich_location richloc (line_table,
next prev parent reply other threads:[~2023-03-02 8:47 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-28 17:12 [Bug testsuite/108973] New: " acoplan at gcc dot gnu.org 2023-03-01 21:21 ` [Bug testsuite/108973] " pinskia at gcc dot gnu.org 2023-03-01 21:22 ` [Bug testsuite/108973] [13 Regression] " pinskia at gcc dot gnu.org 2023-03-02 8:47 ` jakub at gcc dot gnu.org [this message] 2023-03-02 9:10 ` jakub at gcc dot gnu.org 2023-03-02 15:23 ` marxin at gcc dot gnu.org 2023-03-04 8:49 ` cvs-commit at gcc dot gnu.org 2023-03-04 9:29 ` [Bug testsuite/108973] [10/11/12 " jakub at gcc dot gnu.org 2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org 2023-03-20 10:29 ` [Bug testsuite/108973] [10/11 " jakub at gcc dot gnu.org 2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org 2023-05-03 10:42 ` [Bug testsuite/108973] [10 " jakub at gcc dot gnu.org 2023-05-03 15:22 ` cvs-commit at gcc dot gnu.org 2023-05-04 7:25 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-108973-4-1RYxO9dTfI@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).