[PATCH] wmvcore/tests: add tests for WMReader methods
Jefferson Carpenter
jeffersoncarpenter2 at gmail.com
Mon Jul 24 16:05:36 CDT 2017
Thanks for the feedback. I am on it.
Couple questions: Why not use Sleep? (Some other tests such as
ntdll/tests/threadpool.c seem to be using it). And why not use malloc /
free?
On Mon, Jul 24, 2017 at 4:47 AM, Alistair Leslie-Hughes <
leslie_alistair at hotmail.com> wrote:
> Hi Jefferson,
>
> On 24/07/17 08:26, Jefferson Carpenter wrote:
> > Create a sample WMA file, which is saved into a temp directory at the
> > beginning of the wmvcore tests.
> >
> > Added a IWMReaderCallback implementation for use in conformance tests.
> >
> > Tested various playback-related WMReader methods.
> >
> > Changes in version 2 of this patch: Declared loop variable at top of
> > function, and using C89-style comments.
>
> The callback interface can just be static, see mshtml/tests/htmldoc.c
> for an example. Maybe using the CHECKED_CALLED syntax to check if
> something was been called. If the order of called is important then see
> msxml3/tests/saxreader.c for an example.
>
> You cannot use Sleep in tests, no matter how small it has to wait,
> instead use an Event+WaitForSingleObject.
>
> Use HeapAlloc/HeapFree instead of malloc/free, create a worker function
> if required.
>
>
> + IWMReader *reader;
> Leaking reader
>
> + /* Get output props. */
> + hr = IWMReader_GetOutputProps(reader, 0, &props);
> + todo_wine ok(hr == S_OK, "Failed to get output props: 0x%08x\n",
> Leaking props here.
>
> ....
> + for (i = 0; i < formatCount; i++) {
> + /* Get output props for format. */
> + hr = IWMReader_GetOutputFormat(reader, 0, i, &props);
> + todo_wine ok(hr == S_OK, "Failed to get output format:
> and here.
>
>
> Best Regards
> Alistair Leslie-Hughes
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20170724/d5723506/attachment-0001.html>
More information about the wine-devel
mailing list