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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux