Commit 0fb1d1f2 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

qedit/tests: Build without -DWINE_NO_LONG_TYPES.

parent 05d3b1d8
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = qedit.dll
IMPORTS = strmbase strmiids uuid oleaut32 ole32
......
......@@ -74,53 +74,53 @@ static void test_aggregation(void)
timeline = (IAMTimeline *)0xdeadbeef;
hr = CoCreateInstance(&CLSID_AMTimeline, &test_outer, CLSCTX_INPROC_SERVER,
&IID_IAMTimeline, (void **)&timeline);
ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
ok(!timeline, "Got interface %p.\n", timeline);
hr = CoCreateInstance(&CLSID_AMTimeline, &test_outer, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void **)&unk);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n");
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);
ok(ref == 2, "Got unexpected refcount %d.\n", ref);
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk);
ok(ref == 1, "Got unexpected refcount %d.\n", ref);
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
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);
IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IAMTimeline, (void **)&timeline);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMTimeline_QueryInterface(timeline, &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);
hr = IAMTimeline_QueryInterface(timeline, &IID_IAMTimeline, (void **)&timeline2);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(timeline2 == (IAMTimeline *)0xdeadbeef, "Got unexpected IAMTimeline %p.\n", timeline2);
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);
hr = IAMTimeline_QueryInterface(timeline, &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);
IAMTimeline_Release(timeline);
ref = IUnknown_Release(unk);
ok(!ref, "Got unexpected refcount %d.\n", ref);
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
ok(!ref, "Got unexpected refcount %ld.\n", ref);
ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
}
static void test_timeline(void)
......@@ -133,21 +133,21 @@ static void test_timeline(void)
TIMELINE_MAJOR_TYPE type;
hr = CoCreateInstance(&CLSID_AMTimeline, NULL, CLSCTX_INPROC_SERVER, &IID_IAMTimeline, (void **)&timeline);
ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "CoCreateInstance failed: %08x\n", hr);
ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "Got hr %#lx.\n", hr);
if (!timeline) return;
hr = IAMTimeline_QueryInterface(timeline, &IID_IAMTimelineObj, NULL);
ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr);
ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IAMTimeline_QueryInterface(timeline, &IID_IAMTimelineObj, (void **)&obj);
ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\n", hr);
ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
ok(!obj, "Expected NULL got %p\n", obj);
hr = IAMTimeline_CreateEmptyNode(timeline, NULL, 0);
ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr);
ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IAMTimeline_CreateEmptyNode(timeline, NULL, TIMELINE_MAJOR_TYPE_COMPOSITE);
ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr);
ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
for (type = 0; type < 256; type++)
{
......@@ -161,49 +161,49 @@ static void test_timeline(void)
case TIMELINE_MAJOR_TYPE_TRANSITION:
case TIMELINE_MAJOR_TYPE_EFFECT:
case TIMELINE_MAJOR_TYPE_GROUP:
ok(hr == S_OK, "CreateEmptyNode failed: %08x\n", hr);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (obj != &obj_iface) IAMTimelineObj_Release(obj);
break;
default:
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG got %08x\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
ok(obj == &obj_iface, "Expected %p got %p\n", &obj_iface, obj);
}
}
obj = NULL;
hr = IAMTimeline_CreateEmptyNode(timeline, &obj, TIMELINE_MAJOR_TYPE_COMPOSITE);
ok(hr == S_OK, "CreateEmptyNode failed: %08x\n", hr);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (!obj) return;
hr = IAMTimelineObj_QueryInterface(obj, &IID_IAMTimeline, NULL);
ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr);
ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IAMTimelineObj_QueryInterface(obj, &IID_IAMTimeline, (void **)&timeline2);
ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\n", hr);
ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
ok(!timeline2, "Expected NULL got %p\n", timeline2);
hr = IAMTimelineObj_GetTimelineType(obj, NULL);
ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr);
ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IAMTimelineObj_GetTimelineType(obj, &type);
ok(hr == S_OK, "GetTimelineType failed: %08x\n", hr);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(type == TIMELINE_MAJOR_TYPE_COMPOSITE, "Expected TIMELINE_MAJOR_TYPE_COMPOSITE got %d\n", type);
for (type = 0; type < 256; type++)
{
hr = IAMTimelineObj_SetTimelineType(obj, type);
if (type == TIMELINE_MAJOR_TYPE_COMPOSITE)
ok(hr == S_OK, "SetTimelineType failed: %08x\n", hr);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
else
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG got %08x\n", hr);
ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
}
hr = IAMTimelineObj_GetTimelineNoRef(obj, NULL);
ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr);
ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
timeline2 = (IAMTimeline *)0xdeadbeef;
hr = IAMTimelineObj_GetTimelineNoRef(obj, &timeline2);
ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\n", hr);
ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
ok(!timeline2, "Expected NULL got %p\n", timeline2);
IAMTimelineObj_Release(obj);
......@@ -217,22 +217,22 @@ static void test_timelineobj_interfaces(void)
IAMTimelineObj *obj;
hr = CoCreateInstance(&CLSID_AMTimeline, NULL, CLSCTX_INPROC_SERVER, &IID_IAMTimeline, (void **)&timeline);
ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "CoCreateInstance failed: %08x\n", hr);
ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "Got hr %#lx.\n", hr);
if (!timeline)
return;
hr = IAMTimeline_CreateEmptyNode(timeline, &obj, TIMELINE_MAJOR_TYPE_GROUP);
ok(hr == S_OK, "CreateEmptyNode failed: %08x\n", hr);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
if(hr == S_OK)
{
IAMTimelineGroup *group;
IAMTimelineObj *obj2;
hr = IAMTimelineObj_QueryInterface(obj, &IID_IAMTimelineGroup, (void **)&group);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMTimelineGroup_QueryInterface(group, &IID_IAMTimelineObj, (void **)&obj2);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(obj == obj2, "Different pointers\n");
IAMTimelineObj_Release(obj2);
......@@ -255,7 +255,7 @@ START_TEST(timeline)
&IID_IAMTimeline, (void **)&timeline)))
{
/* qedit.dll does not exist on 2003. */
win_skip("Failed to create timeline object, hr %#x.\n", hr);
win_skip("Failed to create timeline object, hr %#lx.\n", hr);
return;
}
IAMTimeline_Release(timeline);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment