On Mi, 2009-04-15 at 13:37 +0200, Paul Vriens wrote: > The lstrcpyW and lstrcatW additions to init() in the tests don't work on > Win95. I guess that's where the new failures come from:
I removed a "broken(hres == VARCMP_GT)", and that's what VarCmp on your w95 machine returned. My second Patch for oleaut32/tests/vartest.c was not applied, otherwise we would have seen the reason in the log. Can you please use the attached diff and post the result? Thanks -- By by ... Detlef
diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index 24ef171..f1abae7 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -257,6 +257,25 @@ static const char *variantstr( const VARIANT *var ) sprintf( vtstr_buffer[vtstr_current], "VT_CY(%x%08x)", S(V_CY(var)).Hi, S(V_CY(var)).Lo ); break; case VT_DATE: sprintf( vtstr_buffer[vtstr_current], "VT_DATE(%g)", V_DATE(var) ); break; + case VT_BOOL: + sprintf( vtstr_buffer[vtstr_current], "VT_BOOL(%d)", V_BOOL(var)); break; + case VT_BSTR: + if (HIWORD(V_BSTR(var))) { + LPSTR data; + DWORD len; + + len = WideCharToMultiByte(CP_ACP, 0, V_BSTR(var), -1, NULL, 0, NULL, NULL); + data = HeapAlloc(GetProcessHeap(), 0, len); + WideCharToMultiByte(CP_ACP, 0, V_BSTR(var), -1, data, len, NULL, NULL); + sprintf( vtstr_buffer[vtstr_current], "VT_BSTR(%s)", data); + HeapFree(GetProcessHeap(), 0, data); + } + else + { + sprintf( vtstr_buffer[vtstr_current], "VT_BSTR(0x%x)", LOWORD(V_BSTR(var))); + } + break; + default: return vtstr(V_VT(var)); } @@ -5430,8 +5449,10 @@ static void test_VarCat(void) V_BOOL(&right) = TRUE; V_BSTR(&expected) = SysAllocString(sz12_true); hres = VarCat(&left,&right,&result); + trace("got 0x%x and %s for %s, %s\n", hres, variantstr(&result), variantstr(&left), variantstr(&right)); ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); hres = VarCmp(&result,&expected,lcid,0); + trace("got 0x%x for %s, %s\n", hres, variantstr(&result), variantstr(&expected)); ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08x for %s, %s\n", hres, variantstr(&result), variantstr(&expected)); @@ -5447,8 +5468,10 @@ static void test_VarCat(void) V_BOOL(&right) = FALSE; V_BSTR(&expected) = SysAllocString(sz12_false); hres = VarCat(&left,&right,&result); + trace("got 0x%x and %s for %s, %s\n", hres, variantstr(&result), variantstr(&left), variantstr(&right)); ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); hres = VarCmp(&result,&expected,lcid,0); + trace("got 0x%x for %s, %s\n", hres, variantstr(&result), variantstr(&expected)); ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08x for %s, %s\n", hres, variantstr(&result), variantstr(&expected));