mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 19:30:58 +00:00
qdvd/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
71ee908690
commit
2388ba40d6
|
@ -1,4 +1,3 @@
|
||||||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
|
||||||
TESTDLL = qdvd.dll
|
TESTDLL = qdvd.dll
|
||||||
IMPORTS = strmiids uuid ole32
|
IMPORTS = strmiids uuid ole32
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ static IDvdGraphBuilder *create_graph_builder(void)
|
||||||
IDvdGraphBuilder *graph = NULL;
|
IDvdGraphBuilder *graph = NULL;
|
||||||
HRESULT hr = CoCreateInstance(&CLSID_DvdGraphBuilder, NULL,
|
HRESULT hr = CoCreateInstance(&CLSID_DvdGraphBuilder, NULL,
|
||||||
CLSCTX_INPROC_SERVER, &IID_IDvdGraphBuilder, (void **)&graph);
|
CLSCTX_INPROC_SERVER, &IID_IDvdGraphBuilder, (void **)&graph);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
return graph;
|
return graph;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO
|
||||||
expected_hr = supported ? S_OK : E_NOINTERFACE;
|
expected_hr = supported ? S_OK : E_NOINTERFACE;
|
||||||
|
|
||||||
hr = IUnknown_QueryInterface(iface, iid, (void **)&unk);
|
hr = IUnknown_QueryInterface(iface, iid, (void **)&unk);
|
||||||
ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr);
|
ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
IUnknown_Release(unk);
|
IUnknown_Release(unk);
|
||||||
}
|
}
|
||||||
|
@ -111,53 +111,53 @@ static void test_aggregation(void)
|
||||||
graph = (IDvdGraphBuilder *)0xdeadbeef;
|
graph = (IDvdGraphBuilder *)0xdeadbeef;
|
||||||
hr = CoCreateInstance(&CLSID_DvdGraphBuilder, &test_outer, CLSCTX_INPROC_SERVER,
|
hr = CoCreateInstance(&CLSID_DvdGraphBuilder, &test_outer, CLSCTX_INPROC_SERVER,
|
||||||
&IID_IDvdGraphBuilder, (void **)&graph);
|
&IID_IDvdGraphBuilder, (void **)&graph);
|
||||||
ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
|
ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
|
||||||
ok(!graph, "Got interface %p.\n", graph);
|
ok(!graph, "Got interface %p.\n", graph);
|
||||||
|
|
||||||
hr = CoCreateInstance(&CLSID_DvdGraphBuilder, &test_outer, CLSCTX_INPROC_SERVER,
|
hr = CoCreateInstance(&CLSID_DvdGraphBuilder, &test_outer, CLSCTX_INPROC_SERVER,
|
||||||
&IID_IUnknown, (void **)&unk);
|
&IID_IUnknown, (void **)&unk);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
|
||||||
ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n");
|
ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n");
|
||||||
ref = get_refcount(unk);
|
ref = get_refcount(unk);
|
||||||
ok(ref == 1, "Got unexpected refcount %d.\n", ref);
|
ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
|
||||||
|
|
||||||
ref = IUnknown_AddRef(unk);
|
ref = IUnknown_AddRef(unk);
|
||||||
ok(ref == 2, "Got unexpected refcount %d.\n", ref);
|
ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
|
||||||
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
|
||||||
|
|
||||||
ref = IUnknown_Release(unk);
|
ref = IUnknown_Release(unk);
|
||||||
ok(ref == 1, "Got unexpected refcount %d.\n", ref);
|
ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
|
||||||
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
|
||||||
|
|
||||||
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2);
|
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2);
|
ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2);
|
||||||
IUnknown_Release(unk2);
|
IUnknown_Release(unk2);
|
||||||
|
|
||||||
hr = IUnknown_QueryInterface(unk, &IID_IDvdGraphBuilder, (void **)&graph);
|
hr = IUnknown_QueryInterface(unk, &IID_IDvdGraphBuilder, (void **)&graph);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IDvdGraphBuilder_QueryInterface(graph, &IID_IUnknown, (void **)&unk2);
|
hr = IDvdGraphBuilder_QueryInterface(graph, &IID_IUnknown, (void **)&unk2);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
|
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
|
||||||
|
|
||||||
hr = IDvdGraphBuilder_QueryInterface(graph, &IID_IDvdGraphBuilder, (void **)&graph2);
|
hr = IDvdGraphBuilder_QueryInterface(graph, &IID_IDvdGraphBuilder, (void **)&graph2);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
ok(graph2 == (IDvdGraphBuilder *)0xdeadbeef, "Got unexpected IDvdGraphBuilder %p.\n", graph2);
|
ok(graph2 == (IDvdGraphBuilder *)0xdeadbeef, "Got unexpected IDvdGraphBuilder %p.\n", graph2);
|
||||||
|
|
||||||
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2);
|
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2);
|
||||||
ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
|
ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
|
||||||
ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
|
ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
|
||||||
|
|
||||||
hr = IDvdGraphBuilder_QueryInterface(graph, &test_iid, (void **)&unk2);
|
hr = IDvdGraphBuilder_QueryInterface(graph, &test_iid, (void **)&unk2);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
|
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
|
||||||
|
|
||||||
IDvdGraphBuilder_Release(graph);
|
IDvdGraphBuilder_Release(graph);
|
||||||
ref = IUnknown_Release(unk);
|
ref = IUnknown_Release(unk);
|
||||||
ok(!ref, "Got unexpected refcount %d.\n", ref);
|
ok(!ref, "Got unexpected refcount %ld.\n", ref);
|
||||||
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST(graph)
|
START_TEST(graph)
|
||||||
|
|
|
@ -28,7 +28,7 @@ static IBaseFilter *create_navigator(void)
|
||||||
IBaseFilter *filter = NULL;
|
IBaseFilter *filter = NULL;
|
||||||
HRESULT hr = CoCreateInstance(&CLSID_DVDNavigator, NULL,
|
HRESULT hr = CoCreateInstance(&CLSID_DVDNavigator, NULL,
|
||||||
CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter);
|
CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
return filter;
|
return filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO
|
||||||
expected_hr = supported ? S_OK : E_NOINTERFACE;
|
expected_hr = supported ? S_OK : E_NOINTERFACE;
|
||||||
|
|
||||||
hr = IUnknown_QueryInterface(iface, iid, (void **)&unk);
|
hr = IUnknown_QueryInterface(iface, iid, (void **)&unk);
|
||||||
ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr);
|
ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
IUnknown_Release(unk);
|
IUnknown_Release(unk);
|
||||||
}
|
}
|
||||||
|
@ -131,53 +131,53 @@ static void test_aggregation(void)
|
||||||
filter = (IBaseFilter *)0xdeadbeef;
|
filter = (IBaseFilter *)0xdeadbeef;
|
||||||
hr = CoCreateInstance(&CLSID_DVDNavigator, &test_outer, CLSCTX_INPROC_SERVER,
|
hr = CoCreateInstance(&CLSID_DVDNavigator, &test_outer, CLSCTX_INPROC_SERVER,
|
||||||
&IID_IBaseFilter, (void **)&filter);
|
&IID_IBaseFilter, (void **)&filter);
|
||||||
ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
|
ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
|
||||||
ok(!filter, "Got interface %p.\n", filter);
|
ok(!filter, "Got interface %p.\n", filter);
|
||||||
|
|
||||||
hr = CoCreateInstance(&CLSID_DVDNavigator, &test_outer, CLSCTX_INPROC_SERVER,
|
hr = CoCreateInstance(&CLSID_DVDNavigator, &test_outer, CLSCTX_INPROC_SERVER,
|
||||||
&IID_IUnknown, (void **)&unk);
|
&IID_IUnknown, (void **)&unk);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
|
||||||
ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n");
|
ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n");
|
||||||
ref = get_refcount(unk);
|
ref = get_refcount(unk);
|
||||||
ok(ref == 1, "Got unexpected refcount %d.\n", ref);
|
ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
|
||||||
|
|
||||||
ref = IUnknown_AddRef(unk);
|
ref = IUnknown_AddRef(unk);
|
||||||
ok(ref == 2, "Got unexpected refcount %d.\n", ref);
|
ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
|
||||||
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
|
||||||
|
|
||||||
ref = IUnknown_Release(unk);
|
ref = IUnknown_Release(unk);
|
||||||
ok(ref == 1, "Got unexpected refcount %d.\n", ref);
|
ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
|
||||||
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
|
||||||
|
|
||||||
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2);
|
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2);
|
ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2);
|
||||||
IUnknown_Release(unk2);
|
IUnknown_Release(unk2);
|
||||||
|
|
||||||
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter);
|
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2);
|
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
|
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
|
||||||
|
|
||||||
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2);
|
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
|
ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
|
||||||
|
|
||||||
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2);
|
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2);
|
||||||
ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
|
ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
|
||||||
ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
|
ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
|
||||||
|
|
||||||
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2);
|
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||||
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
|
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
|
||||||
|
|
||||||
IBaseFilter_Release(filter);
|
IBaseFilter_Release(filter);
|
||||||
ref = IUnknown_Release(unk);
|
ref = IUnknown_Release(unk);
|
||||||
ok(!ref, "Got unexpected refcount %d.\n", ref);
|
ok(!ref, "Got unexpected refcount %ld.\n", ref);
|
||||||
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST(navigator)
|
START_TEST(navigator)
|
||||||
|
|
Loading…
Reference in a new issue