From: Patrick Steinhardt <ps@pks.im>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Phillip Wood <phillip.wood123@gmail.com>
Subject: Re: [PATCH 1/2] t/unit-tests: update clar to 39f11fe
Date: Sat, 6 Dec 2025 12:39:00 +0100 [thread overview]
Message-ID: <aTQV1B_7s11Cad9w@pks.im> (raw)
In-Reply-To: <20251205184020.GB33447@coredump.intra.peff.net>
On Fri, Dec 05, 2025 at 01:40:20PM -0500, Jeff King wrote:
> On Fri, Dec 05, 2025 at 01:57:52PM +0100, Patrick Steinhardt wrote:
> > +#define cl_assert_equal_i_fmt(i1, i2, fmt) cl_assert_compare_i_(i1, i2, CLAR_COMPARISON_EQ, #i1 " == " #i2, fmt " != " fmt, (int)(i1), (int)(i2))
>
> Here we still cast to int. I guess we have to in order to keep custom
> "%o" and friends working. They probably ought to be using PRIoMAX, but
> that would require changes to the tests to do so (and I wonder if we
> might hit any portability issues).
It certainly is the oddball in this context, yes. I would honestly just
want to drop it entirely, but I can't because it would potentially break
other users. libgit2 for example uses it :/
Patrick
next prev parent reply other threads:[~2025-12-06 11:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-05 12:57 [PATCH 0/2] Update clar for improved integer handling Patrick Steinhardt
2025-12-05 12:57 ` [PATCH 1/2] t/unit-tests: update clar to 39f11fe Patrick Steinhardt
2025-12-05 18:40 ` Jeff King
2025-12-06 11:39 ` Patrick Steinhardt [this message]
2025-12-06 5:27 ` Junio C Hamano
2025-12-06 11:46 ` Patrick Steinhardt
2025-12-05 12:57 ` [PATCH 2/2] t/unit-tests: demonstrate use of integer comparison assertions Patrick Steinhardt
2025-12-06 11:47 ` [PATCH v2 0/3] Update clar for improved integer handling Patrick Steinhardt
2025-12-06 11:47 ` [PATCH v2 1/3] t/unit-tests: update clar to 39f11fe Patrick Steinhardt
2025-12-06 11:47 ` [PATCH v2 2/3] t/unit-tests: demonstrate use of integer comparison assertions Patrick Steinhardt
2025-12-06 11:47 ` [PATCH v2 3/3] gitattributes: disable blank-at-eof errors for clar test expectations Patrick Steinhardt
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=aTQV1B_7s11Cad9w@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=phillip.wood123@gmail.com \
/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 NNTP newsgroup(s).