quartz/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cc906096c3
commit
091c771582
|
@ -210,7 +210,7 @@ static void test_filesourcefilter(void)
|
|||
ret = GetTempFileNameW(temp, prefix, 0, path);
|
||||
ok(ret, "GetTempFileNameW failed with error %u\n", GetLastError());
|
||||
|
||||
for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(tests); i++)
|
||||
{
|
||||
trace("Running test for %s\n", tests[i].label);
|
||||
|
||||
|
@ -280,7 +280,7 @@ static WCHAR *load_resource(const WCHAR *name)
|
|||
HRSRC res;
|
||||
void *ptr;
|
||||
|
||||
GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW);
|
||||
GetTempPathW(ARRAY_SIZE(pathW), pathW);
|
||||
lstrcatW(pathW, name);
|
||||
|
||||
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
|
||||
|
|
|
@ -50,7 +50,7 @@ static WCHAR *load_resource(const WCHAR *name)
|
|||
HRSRC res;
|
||||
void *ptr;
|
||||
|
||||
GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW);
|
||||
GetTempPathW(ARRAY_SIZE(pathW), pathW);
|
||||
lstrcatW(pathW, name);
|
||||
|
||||
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
|
||||
|
@ -1500,14 +1500,14 @@ static HRESULT createtestfilter(const CLSID* pClsid, const TestFilterPinData *pi
|
|||
pinInfo.pFilter = &pTestFilter->IBaseFilter_iface;
|
||||
if (pinInfo.dir == PINDIR_INPUT)
|
||||
{
|
||||
lstrcpynW(pinInfo.achName, wcsInputPinName, sizeof(pinInfo.achName) / sizeof(pinInfo.achName[0]));
|
||||
lstrcpynW(pinInfo.achName, wcsInputPinName, ARRAY_SIZE(pinInfo.achName));
|
||||
hr = TestFilter_Pin_Construct(&TestFilter_InputPin_Vtbl, &pinInfo, &mt, &pTestFilter->csFilter,
|
||||
&pTestFilter->ppPins[i]);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
lstrcpynW(pinInfo.achName, wcsOutputPinName, sizeof(pinInfo.achName) / sizeof(pinInfo.achName[0]));
|
||||
lstrcpynW(pinInfo.achName, wcsOutputPinName, ARRAY_SIZE(pinInfo.achName));
|
||||
hr = TestFilter_Pin_Construct(&TestFilter_OutputPin_Vtbl, &pinInfo, &mt, &pTestFilter->csFilter,
|
||||
&pTestFilter->ppPins[i]);
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ static void test_null_renderer_aggregations(void)
|
|||
};
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(iids); i++)
|
||||
{
|
||||
test_aggregation(CLSID_SystemClock, CLSID_NullRenderer, IID_IReferenceClock, *iids[i]);
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ static void test_video_renderer_aggregations(void)
|
|||
};
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(iids); i++)
|
||||
{
|
||||
test_aggregation(CLSID_SystemClock, CLSID_VideoRenderer,
|
||||
IID_IReferenceClock, *iids[i]);
|
||||
|
@ -199,7 +199,7 @@ static void test_filter_graph_aggregations(void)
|
|||
};
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(iids); i++)
|
||||
{
|
||||
test_aggregation(CLSID_SystemClock, CLSID_FilterGraph,
|
||||
IID_IReferenceClock, *iids[i]);
|
||||
|
@ -213,7 +213,7 @@ static void test_filter_mapper_aggregations(void)
|
|||
};
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(iids); i++)
|
||||
{
|
||||
test_aggregation(CLSID_SystemClock, CLSID_FilterMapper2,
|
||||
IID_IReferenceClock, *iids[i]);
|
||||
|
|
Loading…
Reference in New Issue