public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "René Scharfe" <l.s.r@web•de>
Cc: Git List <git@vger•kernel.org>,
	 Chandra Pratap <chandrapratap3519@gmail•com>
Subject: Re: [RFC][PATCH] t-prio-queue: simplify using compound literals
Date: Tue, 02 Apr 2024 13:31:03 -0700	[thread overview]
Message-ID: <xmqq7chf4id4.fsf@gitster.g> (raw)
In-Reply-To: <520da361-1b80-4ba3-87b2-86d6fdfc18b5@web.de> ("René Scharfe"'s message of "Tue, 2 Apr 2024 20:30:31 +0200")

René Scharfe <l.s.r@web•de> writes:

> Test names like "basic" are mentioned seven times in the code (ignoring
> case): Twice when defining the input and result macros, thrice when
> defining the test function, and twice again when calling it.  Reduce
> that to a single time by using compound literals to pass the input and
> result arrays via TEST_INPUT to test_prio_queue().
>
> Signed-off-by: René Scharfe <l.s.r@web•de>
> ---
> C99 added compound literals.  Are we ready to use them?

We don't know.  This might be a good weather-baloon, but I do not
know if people skip t/unit-tests/ without telling us.  After a few
releases with this patch in, perhaps we can find a more central
place to use them to deliberately break the build of these folks and
have them complain, and revert it if it becomes needed?


  reply	other threads:[~2024-04-02 20:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 18:30 [RFC][PATCH] t-prio-queue: simplify using compound literals René Scharfe
2024-04-02 20:31 ` Junio C Hamano [this message]
2024-04-02 20:41 ` Jeff King
2024-04-05 17:44   ` René Scharfe
2024-04-05 19:17     ` Jeff King
2024-04-05 22:01       ` Junio C Hamano
2024-04-06  7:06         ` René Scharfe
2024-04-07  1:28         ` Jeff King
2024-04-08 16:57           ` Junio C Hamano
2024-04-08 17:09             ` Jeff King
2024-04-11 21:23 ` Josh Steadmon

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=xmqq7chf4id4.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=chandrapratap3519@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=l.s.r@web$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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