Re: [PATCH v8 2.5/3] fixup! unit tests: add TAP unit test framework
On 2023.10.16 14:43, Phillip Wood wrote:
Show 19 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>
> Here are a couple of cleanups for the unit test framework that I
> noticed.
>
> Update the documentation of the example custom check to reflect the
> change in return value of test_assert() and mention that
> checks should be careful when dereferencing pointer arguments.
>
> Also avoid evaluating macro augments twice in check_int() and
> friends. The global variable test__tmp was introduced to avoid
> evaluating the arguments to these macros more than once but the macros
> failed to use it when passing the values being compared to
> check_int_loc().
>
> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
> ---
> t/unit-tests/test-lib.h | 26 ++++++++++++++++----------
> 1 file changed, 16 insertions(+), 10 deletions(-)