Safearray Tests
Robert Shearman
rob at codeweavers.com
Tue Aug 24 11:36:29 CDT 2004
Changelog:
More safe array tests.
-------------- next part --------------
? wine/dlls/oleaut32/tests/oleaut32_test.exe.spec.c
Index: wine/dlls/oleaut32/tests/safearray.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/tests/safearray.c,v
retrieving revision 1.14
diff -u -p -r1.14 safearray.c
--- wine/dlls/oleaut32/tests/safearray.c 23 Aug 2004 19:39:50 -0000 1.14
+++ wine/dlls/oleaut32/tests/safearray.c 24 Aug 2004 16:32:44 -0000
@@ -273,6 +273,11 @@ static void test_safearray(void)
hres = SafeArrayGetUBound(a, 1, &l);
ok(hres == S_OK, "SAGUB of 0 size dimensioned array failed with %lx\n",hres);
ok(l == 41, "SAGUB of 0 size dimensioned array failed to return 41, but returned %ld\n",l);
+
+ hres = SafeArrayAccessData(a, &data);
+ ok(hres == S_OK, "SafeArrayAccessData of 0 size dimensioned array failed with %lx\n", hres);
+ SafeArrayUnaccessData(a);
+
bound.cElements = 2;
hres = SafeArrayRedim(a, &bound);
ok(hres == S_OK,"SAR of a 0 elements dimension failed with hres %lx\n", hres);
@@ -610,6 +615,18 @@ static void test_SafeArrayAllocDestroyDe
hres = pSafeArrayAllocDescriptorEx(VT_UI1, 1, NULL);
ok(hres == E_POINTER,"NULL parm gave hres 0x%lx\n", hres);
+
+ hres = pSafeArrayAllocDescriptorEx(-1, 1, &sa);
+ ok(hres == S_OK, "VT = -1 gave hres 0x%lx\n", hres);
+
+ sa->rgsabound[0].cElements = 0;
+ sa->rgsabound[0].lLbound = 1;
+
+ hres = SafeArrayAllocData(sa);
+ todo_wine
+ {
+ ok(hres == S_OK, "SafeArrayAllocData gave hres 0x%lx\n", hres);
+ }
}
static void test_SafeArrayCreateLockDestroy(void)
More information about the wine-patches
mailing list