Juan Lang : 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.
Alexandre Julliard
julliard at winehq.org
Thu Jan 22 08:41:50 CST 2009
Module: wine
Branch: master
Commit: 669ced3a674df73928bc5bc5d4d57093f807d878
URL: http://source.winehq.org/git/wine.git/?a=commit;h=669ced3a674df73928bc5bc5d4d57093f807d878
Author: Juan Lang <juan.lang at gmail.com>
Date: Wed Jan 21 10:38:55 2009 -0800
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 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/dlls/quartz/tests/filtermapper.c b/dlls/quartz/tests/filtermapper.c
index f7d47ab..e8d3678 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");
}
More information about the wine-cvs
mailing list