Commit 61f4fff4 authored by Misha Koshelev's avatar Misha Koshelev Committed by Alexandre Julliard

msi/tests: automation: Add tests for SummaryInfo::PropertyCount.

parent dcbd8e93
......@@ -1296,6 +1296,18 @@ static HRESULT SummaryInfo_PropertyPut(IDispatch *pSummaryInfo, int pid, VARIANT
return invoke(pSummaryInfo, "Property", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_EMPTY);
}
static HRESULT SummaryInfo_PropertyCountGet(IDispatch *pSummaryInfo, int *pCount)
{
VARIANT varresult;
DISPPARAMS dispparams = {NULL, NULL, 0, 0};
HRESULT hr;
hr = invoke(pSummaryInfo, "PropertyCount", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_I4);
*pCount = V_I4(&varresult);
VariantClear(&varresult);
return hr;
}
/* Test the various objects */
#define TEST_SUMMARYINFO_PROPERTIES_MODIFIED 4
......@@ -1309,6 +1321,14 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
HRESULT hr;
int j;
/* SummaryInfo::PropertyCount */
todo_wine
{
hr = SummaryInfo_PropertyCountGet(pSummaryInfo, &j);
ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult 0x%08x\n", hr);
ok(j == num_info, "SummaryInfo_PropertyCount returned %d, expected %d\n", j, num_info);
}
/* SummaryInfo::Property, get for properties we have set */
for (j = 0; j < num_info; j++)
{
......@@ -1429,6 +1449,14 @@ static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *in
ok(V_I4(&var) == V_I4(&varresult), "SummaryInfo_PropertyGet expected %d, but returned %d\n", V_I4(&var), V_I4(&varresult));
VariantClear(&varresult);
VariantClear(&var);
/* SummaryInfo::PropertyCount */
todo_wine
{
hr = SummaryInfo_PropertyCountGet(pSummaryInfo, &j);
ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult 0x%08x\n", hr);
ok(j == num_info+4, "SummaryInfo_PropertyCount returned %d, expected %d\n", j, num_info);
}
}
}
......
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