Huw Davies : oleaut32/tests: Test against floats not integers to silence a clang warning.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 12 10:20:47 CDT 2016


Module: wine
Branch: master
Commit: fcb9ff957bd8df1a572cf4770265b177379c4a94
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fcb9ff957bd8df1a572cf4770265b177379c4a94

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Apr 12 08:42:43 2016 +0100

oleaut32/tests: Test against floats not integers to silence a clang warning.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/oleaut32/tests/vartest.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c
index 4ba453c..00b2919 100644
--- a/dlls/oleaut32/tests/vartest.c
+++ b/dlls/oleaut32/tests/vartest.c
@@ -2544,7 +2544,7 @@ static void test_VarSub(void)
     hres = pVarSub(&left, &right, &result);
     ok(hres == S_OK && V_VT(&result) == VT_R8,
         "VarSub: expected coerced type VT_R8, got %s!\n", vtstr(V_VT(&result)));
-    ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 0),
+    ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 0.0),
         "VarSub: BSTR + BSTR, expected %f got %f\n", 0.0, V_R8(&result));
 
     /* Manually test some VT_CY and VT_DECIMAL variants */
@@ -2565,7 +2565,7 @@ static void test_VarSub(void)
     ok(hres == S_OK && V_VT(&result) == VT_CY,
         "VarSub: expected coerced type VT_CY, got %s!\n", vtstr(V_VT(&result)));
     hres = VarR8FromCy(V_CY(&result), &r);
-    ok(hres == S_OK && EQ_DOUBLE(r, 4702),
+    ok(hres == S_OK && EQ_DOUBLE(r, 4702.0),
         "VarSub: CY value %f, expected %f\n", r, (double)4720);
 
     hres = pVarSub(&left, &dec, &result);
@@ -5384,7 +5384,7 @@ static void test_VarMul(void)
     hres = pVarMul(&cy, &right, &result);
     ok(hres == S_OK && V_VT(&result) == VT_CY, "VarMul: expected coerced type VT_CY, got %s!\n", vtstr(V_VT(&result)));
     hres = VarR8FromCy(V_CY(&result), &r);
-    ok(hres == S_OK && EQ_DOUBLE(r, 42399), "VarMul: CY value %f, expected %f\n", r, (double)42399);
+    ok(hres == S_OK && EQ_DOUBLE(r, 42399.0), "VarMul: CY value %f, expected %f\n", r, (double)42399);
 
     hres = pVarMul(&left, &dec, &result);
     ok(hres == S_OK && V_VT(&result) == VT_DECIMAL, "VarMul: expected coerced type VT_DECIMAL, got %s!\n", vtstr(V_VT(&result)));
@@ -5555,7 +5555,7 @@ static void test_VarAdd(void)
     hres = pVarAdd(&left, &right, &result);
     ok(hres == S_OK && V_VT(&result) == VT_BSTR, "VarAdd: expected coerced type VT_BSTR, got %s!\n", vtstr(V_VT(&result)));
     hres = VarR8FromStr(V_BSTR(&result), 0, 0, &r);
-    ok(hres == S_OK && EQ_DOUBLE(r, 1212), "VarAdd: BSTR value %f, expected %f\n", r, (double)1212);
+    ok(hres == S_OK && EQ_DOUBLE(r, 1212.0), "VarAdd: BSTR value %f, expected %f\n", r, (double)1212);
     VariantClear(&result);
 
     /* Manuly test some VT_CY and VT_DECIMAL variants */
@@ -5575,7 +5575,7 @@ static void test_VarAdd(void)
     hres = pVarAdd(&cy, &right, &result);
     ok(hres == S_OK && V_VT(&result) == VT_CY, "VarAdd: expected coerced type VT_CY, got %s!\n", vtstr(V_VT(&result)));
     hres = VarR8FromCy(V_CY(&result), &r);
-    ok(hres == S_OK && EQ_DOUBLE(r, 4720), "VarAdd: CY value %f, expected %f\n", r, (double)4720);
+    ok(hres == S_OK && EQ_DOUBLE(r, 4720.0), "VarAdd: CY value %f, expected %f\n", r, (double)4720);
 
     hres = pVarAdd(&left, &dec, &result);
     ok(hres == S_OK && V_VT(&result) == VT_DECIMAL, "VarAdd: expected coerced type VT_DECIMAL, got %s!\n", vtstr(V_VT(&result)));




More information about the wine-cvs mailing list