Commit 734a8ea2 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

oleaut32/tests: Convert UI8Copy to existing integer test scheme.

parent df0eaf58
...@@ -2265,33 +2265,13 @@ static void test_VarUI8FromStr(void) ...@@ -2265,33 +2265,13 @@ static void test_VarUI8FromStr(void)
static void test_VarUI8Copy(void) static void test_VarUI8Copy(void)
{ {
HRESULT hres;
VARIANTARG vSrc, vDst;
ULONGLONG in = 1;
if (!has_i8) if (!has_i8)
{ {
win_skip("I8 and UI8 data types are not available\n"); win_skip("I8 and UI8 data types are not available\n");
return; return;
} }
VariantInit(&vSrc); COPYTEST(1ull, VT_UI8, V_UI8(&vSrc), V_UI8(&vDst), V_UI8REF(&vSrc), V_UI8REF(&vDst), "%I64u");
VariantInit(&vDst);
V_VT(&vSrc) = VT_UI8;
V_UI8(&vSrc) = in;
hres = VariantCopy(&vDst, &vSrc);
ok(hres == S_OK && V_VT(&vDst) == VT_UI8 && V_UI8(&vDst) == in,
"copy hres 0x%X, type %d, value (%x%08x) %x%08x\n",
hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_UI8(&vDst) >> 32), (UINT)V_UI8(&vDst) );
V_VT(&vSrc) = VT_UI8|VT_BYREF;
V_UI8REF(&vSrc) = ∈
hres = VariantCopy(&vDst, &vSrc);
ok(hres == S_OK && V_VT(&vDst) == (VT_UI8|VT_BYREF) && V_UI8REF(&vDst) == &in,
"ref hres 0x%X, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, V_UI8REF(&vDst));
hres = VariantCopyInd(&vDst, &vSrc);
ok(hres == S_OK && V_VT(&vDst) == VT_UI8 && V_UI8(&vDst) == in,
"copy hres 0x%X, type %d, value (%x%08x) %x%08x\n",
hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_UI8(&vDst) >> 32), (UINT)V_UI8(&vDst) );
} }
static void test_VarUI8ChangeTypeEx(void) static void test_VarUI8ChangeTypeEx(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment