quartz/tests: Add NULL pointer tests for IGraphBuilder.

Signed-off-by: Qian Hong <qhong@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Qian Hong 2015-11-09 16:44:46 +08:00 committed by Alexandre Julliard
parent 682291fb71
commit 7408a3a79e
1 changed files with 13 additions and 0 deletions

View File

@ -180,6 +180,9 @@ static void test_graph_builder(void)
ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr);
ok(pF != NULL, "pF is NULL\n");
hr = IGraphBuilder_AddFilter(pgraph, NULL, testFilterW);
ok(hr == E_POINTER, "IGraphBuilder_AddFilter returned %x\n", hr);
/* add the two filters to the graph */
hr = IGraphBuilder_AddFilter(pgraph, pF, testFilterW);
ok(hr == S_OK, "failed to add pF to the graph: %x\n", hr);
@ -204,6 +207,16 @@ static void test_graph_builder(void)
hr = IGraphBuilder_FindFilterByName(pgraph, testFilterW, NULL);
ok(hr == E_POINTER, "IGraphBuilder_FindFilterByName returned %x\n", hr);
hr = IGraphBuilder_Connect(pgraph, NULL, pIn);
ok(hr == E_POINTER, "IGraphBuilder_Connect returned %x\n", hr);
hr = IGraphBuilder_Connect(pgraph, pIn, NULL);
ok(hr == E_POINTER, "IGraphBuilder_Connect returned %x\n", hr);
hr = IGraphBuilder_Connect(pgraph, pIn, pIn);
todo_wine
ok(hr == VFW_E_CANNOT_CONNECT, "IGraphBuilder_Connect returned %x\n", hr);
if (pIn) IPin_Release(pIn);
if (pEnum) IEnumPins_Release(pEnum);
if (pF) IBaseFilter_Release(pF);