Subject: Re: [RFC PATCH v2 6/7] t/unit-tests: convert strvec tests to use clar

From: Patrick Steinhardt <[email-masked]>
Date: Wed, 7 Aug 2024 07:52:14 +0200

On Tue, Aug 06, 2024 at 04:05:46PM -0700, Josh Steadmon wrote:
> On 2024.08.06 16:14, Patrick Steinhardt wrote:
> > -static void t_static_init(void)
> > +void test_strvec__init(void)
> >  {
> >  	struct strvec vec = STRVEC_INIT;
> > -	check_pointer_eq(vec.v, empty_strvec);
> > -	check_uint(vec.nr, ==, 0);
> > -	check_uint(vec.alloc, ==, 0);
> > +	cl_assert_equal_p(vec.v, empty_strvec);
> > +	cl_assert(vec.nr == 0);
> > +	cl_assert(vec.alloc == 0);
> 
> Is there a reason you used cl_assert() instead of cl_assert_equal_i()
> for the .nr and .alloc checks here and below?

No, there isn't. Let me adapt these indeed, thanks!

Patrick