winmm: Add a bunch of new mmio tests which discover some bugs in mmio handling.

Alexandre Julliard julliard at winehq.org
Fri Jan 22 06:55:19 CST 2010


Dmitry Timoshkov <dmitry at codeweavers.com> writes:

> @@ -45,6 +45,20 @@ static DWORD RIFF_buf[] =
>      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
>  };
>  
> +#define expect_buf_offset(_hmmio, _off) \
> +do \
> +{ \
> +    MMIOINFO _mmio; \
> +    LONG _ret; \
> +    memset(&_mmio, 0, sizeof(_mmio)); \
> +    _ret = mmioGetInfo((_hmmio), &_mmio, 0); \
> +    ok(_ret == MMSYSERR_NOERROR, "mmioGetInfo error %u\n", _ret); \
> +    ok(_mmio.lBufOffset == 0, "expected 0, got %d\n", _mmio.lBufOffset); \
> +    _ret = mmioSeek((_hmmio), 0, SEEK_CUR); \
> +    ok(_ret == (_off), "expected %d, got %d\n", (_off), _ret); \
> +} \
> +while (0)

Please avoid such multi-line macros, define a function instead.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list