diff options
author | Pauli <paul.dale@oracle.com> | 2017-04-10 07:13:59 +1000 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-04-10 19:44:02 -0400 |
commit | 298f40e1f14981e535f82edf407718680ad7f86a (patch) | |
tree | 8b1a669559b51201f9adeec7fee107b71a838fbb | |
parent | 8313a787d770ac1d7ddafcbc41b13e7fb5841eae (diff) |
Make test marcos for true/false checks reliable for all integral types.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3154)
-rw-r--r-- | test/testutil.h | 4 |
1 files 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 |