public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: [committed] diagnostics, v2: Fix up selftests with $COLUMNS < 42 [PR108973]
Date: Sat, 4 Mar 2023 09:50:44 +0100	[thread overview]
Message-ID: <ZAMGZG59v6MuoI43@tucnak> (raw)
In-Reply-To: <e08d8b077551adb2e29d7725256f64abbc64dd70.camel@redhat.com>

On Fri, Mar 03, 2023 at 08:54:32AM -0500, David Malcolm wrote:
> Thanks for working on this.
> 
> Patch is OK, but I wonder if it would even better to just hardcode
> caret_max_width as 80 here, to better eliminate that influence from
> from the environment in the unit tests?  I think all of the tests that
> modify caret_max_width do so after the ctor has run.

Thanks, here is what I've committed after another bootstrap/regtest:

2023-03-04  Jakub Jelinek  <jakub@redhat.com>

	PR testsuite/108973
	* selftest-diagnostic.cc
	(test_diagnostic_context::test_diagnostic_context): Set
	caret_max_width to 80.

--- gcc/selftest-diagnostic.cc.jj	2023-01-02 09:32:31.991146491 +0100
+++ gcc/selftest-diagnostic.cc	2023-03-02 10:05:17.974321025 +0100
@@ -41,6 +41,7 @@ test_diagnostic_context::test_diagnostic
   show_column = true;
   start_span = start_span_cb;
   min_margin_width = 6;
+  caret_max_width = 80;
 }
 
 test_diagnostic_context::~test_diagnostic_context ()


	Jakub


      reply	other threads:[~2023-03-04  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-03  9:35 [PATCH] diagnostics: " Jakub Jelinek
2023-03-03 13:54 ` David Malcolm
2023-03-04  8:50   ` Jakub Jelinek [this message]

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=ZAMGZG59v6MuoI43@tucnak \
    --to=jakub@redhat.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@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: link
Be 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).