James Hawkins : oleaut32: Fix a few tests that fail in win2k.
Alexandre Julliard
julliard at winehq.org
Thu Apr 17 07:38:44 CDT 2008
Module: wine
Branch: master
Commit: 04b820c354dac0180589bfc6536bbd19041753f0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=04b820c354dac0180589bfc6536bbd19041753f0
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Wed Apr 16 17:12:02 2008 -0500
oleaut32: Fix a few tests that fail in win2k.
---
dlls/oleaut32/tests/vartest.c | 38 ++++++++++++++++++++++++++++----------
1 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c
index c86ec95..a5a462c 100644
--- a/dlls/oleaut32/tests/vartest.c
+++ b/dlls/oleaut32/tests/vartest.c
@@ -6859,11 +6859,20 @@ static void test_VarPow(void)
"VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0);
hres = pVarPow(&cy, &right, &result);
- ok(hres == S_OK && V_VT(&result) == VT_R8,
- "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n",
- S_OK, hres, vtstr(V_VT(&result)));
- ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0),
- "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0);
+ if (hres == S_OK)
+ {
+ ok(hres == S_OK && V_VT(&result) == VT_R8,
+ "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n",
+ S_OK, hres, vtstr(V_VT(&result)));
+ ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0),
+ "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0);
+ }
+ else
+ {
+ ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY,
+ "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n",
+ DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result)));
+ }
hres = pVarPow(&left, &cy, &result);
ok(hres == S_OK && V_VT(&result) == VT_R8,
@@ -6887,11 +6896,20 @@ static void test_VarPow(void)
"VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0);
hres = pVarPow(&dec, &right, &result);
- ok(hres == S_OK && V_VT(&result) == VT_R8,
- "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n",
- S_OK, hres, vtstr(V_VT(&result)));
- ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0),
- "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0);
+ if (hres == S_OK)
+ {
+ ok(hres == S_OK && V_VT(&result) == VT_R8,
+ "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n",
+ S_OK, hres, vtstr(V_VT(&result)));
+ ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0),
+ "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0);
+ }
+ else
+ {
+ ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY,
+ "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n",
+ DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result)));
+ }
SysFreeString(num2_str);
SysFreeString(num3_str);
More information about the wine-cvs
mailing list