From 669ced3a674df73928bc5bc5d4d57093f807d878 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Wed, 21 Jan 2009 10:38:55 -0800 Subject: [PATCH] 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. --- dlls/quartz/tests/filtermapper.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dlls/quartz/tests/filtermapper.c b/dlls/quartz/tests/filtermapper.c index f7d47abb3e5..e8d36782d42 100644 --- a/dlls/quartz/tests/filtermapper.c +++ b/dlls/quartz/tests/filtermapper.c @@ -142,6 +142,16 @@ static void test_fm2_enummatchingfilters(void) { found = enum_find_filter(wszFilterName1, pEnum); 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); ok(found, "EnumMatchingFilters failed to return the test filter 2\n"); } @@ -159,6 +169,17 @@ static void test_fm2_enummatchingfilters(void) { found = enum_find_filter(wszFilterName1, pEnum); 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); ok(!found, "EnumMatchingFilters should not return the test filter 2\n"); }