test/params_test.c: use TEST_double_eq to check doubles
authorRichard Levitte <levitte@openssl.org>
Wed, 13 Mar 2019 13:06:03 +0000 (14:06 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 13 Mar 2019 13:28:27 +0000 (14:28 +0100)
TEST_ulong_eq was used previously because TEST_double_eq didn't exist
at the time.

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/8469)

test/params_test.c

index 7fc21da..338e6b2 100644 (file)
@@ -469,7 +469,7 @@ static int test_case_variant(const OSSL_PARAM *params,
 
     if (!TEST_true(prov->get_params(obj, params))
         || !TEST_int_eq(app_p1, p1_init)        /* "provider" value */
-        || !TEST_ulong_eq(app_p2, app_p2_init)  /* Should remain untouched */
+        || !TEST_double_eq(app_p2, app_p2_init) /* Should remain untouched */
         || !TEST_ptr(BN_native2bn(bignumbin, bignumbin_l, app_p3))
         || !TEST_BN_eq(app_p3, verify_p3)       /* "provider" value */
         || !TEST_str_eq(app_p4, p4_init)        /* "provider" value */
@@ -491,7 +491,7 @@ static int test_case_variant(const OSSL_PARAM *params,
         struct object_st *sneakpeek = obj;
 
         if (!TEST_int_eq(sneakpeek->p1, app_p1)         /* app value set */
-            || !TEST_ulong_eq(sneakpeek->p2, p2_init) /* Should remain untouched */
+            || !TEST_double_eq(sneakpeek->p2, p2_init)  /* Should remain untouched */
             || !TEST_BN_eq(sneakpeek->p3, app_p3)       /* app value set */
             || !TEST_str_eq(sneakpeek->p4, app_p4)      /* app value set */
             || !TEST_str_eq(sneakpeek->p5, app_p5))     /* app value set */
@@ -512,7 +512,7 @@ static int test_case_variant(const OSSL_PARAM *params,
 
     if (!TEST_true(prov->get_params(obj, params))
         || !TEST_int_eq(app_p1, app_p1_init)    /* app value */
-        || !TEST_ulong_eq(app_p2, app_p2_init)  /* Should remain untouched */
+        || !TEST_double_eq(app_p2, app_p2_init) /* Should remain untouched */
         || !TEST_ptr(BN_native2bn(bignumbin, bignumbin_l, app_p3))
         || !TEST_BN_eq(app_p3, verify_p3)       /* app value */
         || !TEST_str_eq(app_p4, app_p4_init)    /* app value */