Re: [RFC PATCH v2 6/7] t/unit-tests: convert strvec tests to use clar
On Tue, Aug 06, 2024 at 04:05:46PM -0700, Josh Steadmon wrote:
Show 14 quoted lines
> 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