Commit 9d15067c authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oleaut32/tests: Fix a dead path in test (Valgrind).

parent d51a7940
...@@ -127,9 +127,11 @@ static HRESULT CALLBACK IRecordInfoImpl_GetSize(IRecordInfo *iface, ULONG* size) ...@@ -127,9 +127,11 @@ static HRESULT CALLBACK IRecordInfoImpl_GetSize(IRecordInfo *iface, ULONG* size)
{ {
IRecordInfoImpl* This = impl_from_IRecordInfo(iface); IRecordInfoImpl* This = impl_from_IRecordInfo(iface);
This->sizeCalled++; This->sizeCalled++;
*size = 17;
if (fail_GetSize) if (fail_GetSize)
{
*size = RECORD_SIZE_FAIL;
return E_UNEXPECTED; return E_UNEXPECTED;
}
*size = RECORD_SIZE; *size = RECORD_SIZE;
return S_OK; return S_OK;
} }
...@@ -846,7 +848,10 @@ static void test_VectorCreateLockDestroy(void) ...@@ -846,7 +848,10 @@ static void test_VectorCreateLockDestroy(void)
int element; int element;
if (!pSafeArrayCreateVector) if (!pSafeArrayCreateVector)
{
win_skip("SafeArrayCreateVector not supported\n");
return; return;
}
sa = pSafeArrayCreateVector(VT_UI1, 0, 0); sa = pSafeArrayCreateVector(VT_UI1, 0, 0);
ok(sa != NULL, "SACV with 0 elements failed.\n"); ok(sa != NULL, "SACV with 0 elements failed.\n");
...@@ -1256,7 +1261,10 @@ static void test_SafeArrayCopyData(void) ...@@ -1256,7 +1261,10 @@ static void test_SafeArrayCopyData(void)
int dimension,size=1; int dimension,size=1;
if (!pSafeArrayCopyData) if (!pSafeArrayCopyData)
{
win_skip("SafeArrayCopyData not supported\n");
return; return;
}
for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++) for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++)
{ {
...@@ -1342,7 +1350,10 @@ static void test_SafeArrayCreateEx(void) ...@@ -1342,7 +1350,10 @@ static void test_SafeArrayCreateEx(void)
int dimension; int dimension;
if (!pSafeArrayCreateEx) if (!pSafeArrayCreateEx)
{
win_skip("SafeArrayCreateEx not supported\n");
return; return;
}
for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++) for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++)
{ {
...@@ -1467,6 +1478,8 @@ static void test_SafeArrayCreateEx(void) ...@@ -1467,6 +1478,8 @@ static void test_SafeArrayCreateEx(void)
ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %d times\n", iRec->clearCalled); ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %d times\n", iRec->clearCalled);
ok(iRec->ref == START_REF_COUNT, "Wrong iRec refcount %d\n", iRec->ref); ok(iRec->ref == START_REF_COUNT, "Wrong iRec refcount %d\n", iRec->ref);
} }
else
SafeArrayDestroy(sa);
} }
static void test_SafeArrayClear(void) static void test_SafeArrayClear(void)
...@@ -1672,7 +1685,6 @@ static void test_SafeArrayChangeTypeEx(void) ...@@ -1672,7 +1685,6 @@ static void test_SafeArrayChangeTypeEx(void)
hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_EMPTY); hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_EMPTY);
ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres); ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres);
VariantClear(&v); VariantClear(&v);
} }
static void test_SafeArrayDestroyData (void) static void test_SafeArrayDestroyData (void)
...@@ -1724,6 +1736,7 @@ START_TEST(safearray) ...@@ -1724,6 +1736,7 @@ START_TEST(safearray)
GETPTR(SafeArrayGetVartype); GETPTR(SafeArrayGetVartype);
GETPTR(SafeArrayCreateEx); GETPTR(SafeArrayCreateEx);
GETPTR(SafeArrayCreateVector); GETPTR(SafeArrayCreateVector);
GETPTR(SafeArrayGetRecordInfo);
check_for_VT_INT_PTR(); check_for_VT_INT_PTR();
test_safearray(); test_safearray();
......
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