[PATCH v2 4/5] qedit: Implement IAMTimelineObj_SetTimelineType and add tests.
Andrew Eikum
aeikum at codeweavers.com
Wed Apr 27 08:50:57 CDT 2016
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
On Tue, Apr 26, 2016 at 11:12:49PM -0600, Alex Henrie wrote:
> Cc: Andrew Eikum <aeikum at codeweavers.com>
>
> Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
> ---
> dlls/qedit/tests/timeline.c | 9 +++++++++
> dlls/qedit/timeline.c | 6 ++++--
> 2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/dlls/qedit/tests/timeline.c b/dlls/qedit/tests/timeline.c
> index ecb4223..ca00063 100644
> --- a/dlls/qedit/tests/timeline.c
> +++ b/dlls/qedit/tests/timeline.c
> @@ -82,6 +82,15 @@ static void test_timeline(void)
> hr = IAMTimelineObj_GetTimelineType(obj, &type);
> ok(hr == S_OK, "GetTimelineType failed: %08x\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);
> + else
> + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG got %08x\n", hr);
> + }
> }
>
> START_TEST(timeline)
> diff --git a/dlls/qedit/timeline.c b/dlls/qedit/timeline.c
> index 0ecb1b5..a2552d2 100644
> --- a/dlls/qedit/timeline.c
> +++ b/dlls/qedit/timeline.c
> @@ -602,9 +602,11 @@ static HRESULT WINAPI TimelineObj_GetTimelineType(IAMTimelineObj *iface, TIMELIN
>
> static HRESULT WINAPI TimelineObj_SetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE type)
> {
> + /* MSDN says that this function is "not supported" */
> TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
> - FIXME("(%p)->(%d): not implemented!\n", This, type);
> - return E_NOTIMPL;
> + TRACE("(%p)->(%d)\n", This, type);
> + if (type != This->timeline_type) return E_INVALIDARG;
> + return S_OK;
> }
>
> static HRESULT WINAPI TimelineObj_GetUserID(IAMTimelineObj *iface, LONG *id)
> --
> 2.8.0
>
More information about the wine-patches
mailing list