oleaut32: Fix copy and paste error in VARIANT_UserUnmarshall with VT_UNKNOWN test.
The variant type is VT_UNKNOWN so we should be using V_UNKNOWN, not V_VARIANTREF(V_R8) to check the type unmarshalled properly.
This commit is contained in:
parent
5b072fbbec
commit
0efbce5112
|
@ -1043,7 +1043,6 @@ static void test_marshal_VARIANT(void)
|
||||||
lpsa = SafeArrayCreate(VT_R8, 1, &sab);
|
lpsa = SafeArrayCreate(VT_R8, 1, &sab);
|
||||||
*(DWORD *)lpsa->pvData = 0xcafebabe;
|
*(DWORD *)lpsa->pvData = 0xcafebabe;
|
||||||
*((DWORD *)lpsa->pvData + 1) = 0xdeadbeef;
|
*((DWORD *)lpsa->pvData + 1) = 0xdeadbeef;
|
||||||
lpsa->cLocks = 7;
|
|
||||||
|
|
||||||
VariantInit(&v);
|
VariantInit(&v);
|
||||||
V_VT(&v) = VT_UI4 | VT_ARRAY;
|
V_VT(&v) = VT_UI4 | VT_ARRAY;
|
||||||
|
@ -1127,7 +1126,6 @@ static void test_marshal_VARIANT(void)
|
||||||
VARIANT_UserFree(&umcb.Flags, &v2);
|
VARIANT_UserFree(&umcb.Flags, &v2);
|
||||||
}
|
}
|
||||||
HeapFree(GetProcessHeap(), 0, buffer);
|
HeapFree(GetProcessHeap(), 0, buffer);
|
||||||
lpsa->cLocks = 0;
|
|
||||||
SafeArrayDestroy(lpsa);
|
SafeArrayDestroy(lpsa);
|
||||||
|
|
||||||
/*** VARIANT BYREF ***/
|
/*** VARIANT BYREF ***/
|
||||||
|
@ -1216,9 +1214,7 @@ static void test_marshal_VARIANT(void)
|
||||||
stubMsg.Buffer = buffer;
|
stubMsg.Buffer = buffer;
|
||||||
next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3);
|
next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3);
|
||||||
ok(V_VT(&v) == V_VT(&v3), "got vt %d expect %d\n", V_VT(&v), V_VT(&v3));
|
ok(V_VT(&v) == V_VT(&v3), "got vt %d expect %d\n", V_VT(&v), V_VT(&v3));
|
||||||
ok(V_VT(V_VARIANTREF(&v)) == V_VT(V_VARIANTREF(&v3)), "vts differ %x %x\n",
|
ok(V_UNKNOWN(&v) == V_UNKNOWN(&v3), "got %p expect %p\n", V_UNKNOWN(&v), V_UNKNOWN(&v3));
|
||||||
V_VT(V_VARIANTREF(&v)), V_VT(V_VARIANTREF(&v3)));
|
|
||||||
ok(V_R8(V_VARIANTREF(&v)) == V_R8(V_VARIANTREF(&v3)), "r8s differ\n");
|
|
||||||
VARIANT_UserFree(&umcb.Flags, &v3);
|
VARIANT_UserFree(&umcb.Flags, &v3);
|
||||||
ok(heap_unknown->refs == 1, "%d refcounts of IUnknown leaked\n", heap_unknown->refs - 1);
|
ok(heap_unknown->refs == 1, "%d refcounts of IUnknown leaked\n", heap_unknown->refs - 1);
|
||||||
IUnknown_Release((IUnknown *)heap_unknown);
|
IUnknown_Release((IUnknown *)heap_unknown);
|
||||||
|
|
Loading…
Reference in New Issue