oleaut32/tests: Test against floats not integers to silence a clang warning.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f8220cbe93
commit
fcb9ff957b
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue