Commit 669ced3a authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

quartz: Only test for the presence or absence of a single filter in a loop.…

quartz: Only test for the presence or absence of a single filter in a loop. Testing for more than one depends on the order of enumeration, which isn't guaranteed.
parent e13781a3
...@@ -142,6 +142,16 @@ static void test_fm2_enummatchingfilters(void) ...@@ -142,6 +142,16 @@ static void test_fm2_enummatchingfilters(void)
{ {
found = enum_find_filter(wszFilterName1, pEnum); found = enum_find_filter(wszFilterName1, pEnum);
ok(found, "EnumMatchingFilters failed to return the test filter 1\n"); ok(found, "EnumMatchingFilters failed to return the test filter 1\n");
}
if (pEnum) IEnumMoniker_Release(pEnum);
pEnum = NULL;
hr = IFilterMapper2_EnumMatchingFilters(pMapper, &pEnum, 0, TRUE, MERIT_UNLIKELY, TRUE,
0, NULL, NULL, &GUID_NULL, FALSE, FALSE, 0, NULL, NULL, &GUID_NULL);
ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr);
if (SUCCEEDED(hr) && pEnum)
{
found = enum_find_filter(wszFilterName2, pEnum); found = enum_find_filter(wszFilterName2, pEnum);
ok(found, "EnumMatchingFilters failed to return the test filter 2\n"); ok(found, "EnumMatchingFilters failed to return the test filter 2\n");
} }
...@@ -159,6 +169,17 @@ static void test_fm2_enummatchingfilters(void) ...@@ -159,6 +169,17 @@ static void test_fm2_enummatchingfilters(void)
{ {
found = enum_find_filter(wszFilterName1, pEnum); found = enum_find_filter(wszFilterName1, pEnum);
ok(found, "EnumMatchingFilters failed to return the test filter 1\n"); ok(found, "EnumMatchingFilters failed to return the test filter 1\n");
}
if (pEnum) IEnumMoniker_Release(pEnum);
pEnum = NULL;
hr = IFilterMapper2_EnumMatchingFilters(pMapper, &pEnum, 0, TRUE, MERIT_UNLIKELY, TRUE,
0, NULL, NULL, &GUID_NULL, TRUE, FALSE, 0, NULL, NULL, &GUID_NULL);
ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr);
if (SUCCEEDED(hr) && pEnum)
{
found = enum_find_filter(wszFilterName2, pEnum); found = enum_find_filter(wszFilterName2, pEnum);
ok(!found, "EnumMatchingFilters should not return the test filter 2\n"); ok(!found, "EnumMatchingFilters should not return the test filter 2\n");
} }
......
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