[PATCH 3/5] wincodecs/tests: Add more stream tests.
Nikolay Sivov
nsivov at codeweavers.com
Thu Nov 29 01:50:33 CST 2018
On 11/29/18 10:44 AM, Józef Kucia wrote:
> On Thu, Nov 29, 2018 at 7:04 AM Nikolay Sivov <nsivov at codeweavers.com> wrote:
>> Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
>> ---
>> dlls/windowscodecs/tests/stream.c | 394 ++++++++++++++++++++++++++----
>> 1 file changed, 343 insertions(+), 51 deletions(-)
>>
>> diff --git a/dlls/windowscodecs/tests/stream.c b/dlls/windowscodecs/tests/stream.c
>> index 5f311b897b..395be433d4 100644
>> --- a/dlls/windowscodecs/tests/stream.c
>> +++ b/dlls/windowscodecs/tests/stream.c
>> @@ -21,6 +21,22 @@
>> #define COBJMACROS
>> #include "wincodec.h"
>>
>> +#define CHECK_CUR_POS(a, b) _check_cur_pos((IStream *)a, b, FALSE, __LINE__)
>> +#define CHECK_CUR_POS_TODO(a, b) _check_cur_pos((IStream *)a, b, TRUE, __LINE__)
>> +static void _check_cur_pos(IStream *stream, ULONGLONG expected_pos, BOOL todo, unsigned int line)
>> +{
>> + LARGE_INTEGER offset;
>> + ULARGE_INTEGER pos;
>> + HRESULT hr;
>> +
>> + offset.QuadPart = 0;
>> + hr = IStream_Seek(stream, offset, STREAM_SEEK_CUR, &pos);
>> + ok(hr == S_OK, "Failed to get current position, hr %#x.\n", hr);
> I think you should pass "line" to ok() call.
Sure, I'm going to resend anyway. It's not important in practice, but
may be better for consistency.
>
>> +todo_wine_if(todo)
>> + ok_(__FILE__, line)(pos.QuadPart == expected_pos, "Unexpected stream position %s.\n",
>> + wine_dbgstr_longlong(pos.QuadPart));
>> +}
>> +
More information about the wine-devel
mailing list