Zebediah Figura : quartz/tests: Add some tests for IFilterGraph_FindFilterByName().
Alexandre Julliard
julliard at winehq.org
Wed Sep 19 16:28:13 CDT 2018
Module: wine
Branch: master
Commit: 5f0bb5bd34efc9f20f812b63e7444d7b522a8d05
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5f0bb5bd34efc9f20f812b63e7444d7b522a8d05
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Sep 18 22:44:12 2018 -0500
quartz/tests: Add some tests for IFilterGraph_FindFilterByName().
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/quartz/tests/filtergraph.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index 4d49772..2374e2f 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -1878,15 +1878,25 @@ static void test_add_remove_filter(void)
struct testfilter filter;
IFilterGraph2 *graph = create_graph();
+ IBaseFilter *ret_filter;
HRESULT hr;
testfilter_init(&filter, NULL, 0);
+ hr = IFilterGraph2_FindFilterByName(graph, testid, &ret_filter);
+ ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
+ ok(!ret_filter, "Got filter %p.\n", ret_filter);
+
hr = IFilterGraph2_AddFilter(graph, &filter.IBaseFilter_iface, testid);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(filter.graph == (IFilterGraph *)graph, "Got graph %p.\n", filter.graph);
ok(!lstrcmpW(filter.name, testid), "Got name %s.\n", wine_dbgstr_w(filter.name));
+ hr = IFilterGraph2_FindFilterByName(graph, testid, &ret_filter);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(ret_filter == &filter.IBaseFilter_iface, "Got filter %p.\n", ret_filter);
+ IBaseFilter_Release(ret_filter);
+
hr = IFilterGraph2_RemoveFilter(graph, &filter.IBaseFilter_iface);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!filter.graph, "Got graph %p.\n", filter.graph);
@@ -1894,11 +1904,20 @@ static void test_add_remove_filter(void)
ok(!filter.clock, "Got clock %p,\n", filter.clock);
ok(filter.ref == 1, "Got outstanding refcount %d.\n", filter.ref);
+ hr = IFilterGraph2_FindFilterByName(graph, testid, &ret_filter);
+ ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr);
+ ok(!ret_filter, "Got filter %p.\n", ret_filter);
+
hr = IFilterGraph2_AddFilter(graph, &filter.IBaseFilter_iface, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(filter.graph == (IFilterGraph *)graph, "Got graph %p.\n", filter.graph);
ok(!lstrcmpW(filter.name, defaultid), "Got name %s.\n", wine_dbgstr_w(filter.name));
+ hr = IFilterGraph2_FindFilterByName(graph, defaultid, &ret_filter);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(ret_filter == &filter.IBaseFilter_iface, "Got filter %p.\n", ret_filter);
+ IBaseFilter_Release(ret_filter);
+
/* test releasing the filter graph while filters are still connected */
hr = IFilterGraph2_Release(graph);
ok(!hr, "Got outstanding refcount %d.\n", hr);
More information about the wine-cvs
mailing list