From 298f40e1f14981e535f82edf407718680ad7f86a Mon Sep 17 00:00:00 2001 From: Pauli Date: Mon, 10 Apr 2017 07:13:59 +1000 Subject: [PATCH] Make test marcos for true/false checks reliable for all integral types. Reviewed-by: Richard Levitte Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/3154) --- test/testutil.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/testutil.h b/test/testutil.h index 1ca295cc16..a83323b9e8 100644 --- a/test/testutil.h +++ b/test/testutil.h @@ -291,8 +291,8 @@ void test_info_c90(const char *desc, ...) PRINTF_FORMAT(1, 2); # define TEST_mem_eq(a, m, b, n) test_mem_eq(__FILE__, __LINE__, #a, #b, a, m, b, n) # define TEST_mem_ne(a, m, b, n) test_mem_ne(__FILE__, __LINE__, #a, #b, a, m, b, n) -# define TEST_true(a) test_true(__FILE__, __LINE__, #a, a) -# define TEST_false(a) test_false(__FILE__, __LINE__, #a, a) +# define TEST_true(a) test_true(__FILE__, __LINE__, #a, (a) != 0) +# define TEST_false(a) test_false(__FILE__, __LINE__, #a, (a) != 0) /* * TEST_error(desc, ...) prints an informative error message in the standard -- 2.25.1