From 5388299117674774609e9a0df6edc27ef979430c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 21 Dec 2024 10:39:07 +1000 Subject: [PATCH] test: slightly improve the failure message for litest_assert_not_null Now prints FAILED: ev != NULL which is less ambiguous/confusing than the previous FAILED: ev expected to be not NULL Part-of: --- test/litest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/litest.h b/test/litest.h index 0802298b..993355d8 100644 --- a/test/litest.h +++ b/test/litest.h @@ -167,7 +167,7 @@ litest_fail_comparison_str(const char *file, do { \ if ((cond) == NULL) \ litest_fail_condition(__FILE__, __LINE__, __func__, \ - #cond, " expected to be not NULL\n"); \ + #cond " != NULL", "\n"); \ } while(0) #define litest_assert_comparison_int_(a_, op_, b_) \