[PATCH v2 3/5] qedit: Implement IAMTimelineObj_GetTimelineType and add tests.

Andrew Eikum aeikum at codeweavers.com
Wed Apr 27 08:50:49 CDT 2016


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>

On Tue, Apr 26, 2016 at 11:12:48PM -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 | 7 +++++++
>  dlls/qedit/timeline.c       | 8 ++++++--
>  2 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/dlls/qedit/tests/timeline.c b/dlls/qedit/tests/timeline.c
> index d2b299c..ecb4223 100644
> --- a/dlls/qedit/tests/timeline.c
> +++ b/dlls/qedit/tests/timeline.c
> @@ -75,6 +75,13 @@ static void test_timeline(void)
>      hr = IAMTimelineObj_QueryInterface(obj, &IID_IAMTimeline, (void **)&timeline2);
>      ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\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);
> +
> +    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);
>  }
>  
>  START_TEST(timeline)
> diff --git a/dlls/qedit/timeline.c b/dlls/qedit/timeline.c
> index 3274892..0ecb1b5 100644
> --- a/dlls/qedit/timeline.c
> +++ b/dlls/qedit/timeline.c
> @@ -52,6 +52,7 @@ static inline TimelineImpl *impl_from_IAMTimeline(IAMTimeline *iface)
>  typedef struct {
>      IAMTimelineObj IAMTimelineObj_iface;
>      LONG ref;
> +    TIMELINE_MAJOR_TYPE timeline_type;
>  } TimelineObjImpl;
>  
>  static inline TimelineObjImpl *impl_from_IAMTimelineObj(IAMTimelineObj *iface)
> @@ -169,6 +170,7 @@ static HRESULT WINAPI Timeline_IAMTimeline_CreateEmptyNode(IAMTimeline *iface, I
>  
>      obj_impl->ref = 1;
>      obj_impl->IAMTimelineObj_iface.lpVtbl = &IAMTimelineObj_VTable;
> +    obj_impl->timeline_type = type;
>  
>      *obj = &obj_impl->IAMTimelineObj_iface;
>      return S_OK;
> @@ -592,8 +594,10 @@ static HRESULT WINAPI TimelineObj_GetSubObjectLoaded(IAMTimelineObj *iface, BOOL
>  static HRESULT WINAPI TimelineObj_GetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE *type)
>  {
>      TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
> -    FIXME("(%p)->(%p): not implemented!\n", This, type);
> -    return E_NOTIMPL;
> +    TRACE("(%p)->(%p)\n", This, type);
> +    if (!type) return E_POINTER;
> +    *type = This->timeline_type;
> +    return S_OK;
>  }
>  
>  static HRESULT WINAPI TimelineObj_SetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE type)
> -- 
> 2.8.0
> 



More information about the wine-patches mailing list