[PATCH v2] dmstyle/tests: Relax dwValidData test

Michael Stefaniuc mstefani at winehq.org
Wed Dec 19 15:00:24 CST 2018


Hello Alex,

I have simplified the test even more.
The information that DMUS_OBJ_OBJECT or DMUS_OBJ_VERSION might be
sporadically set isn't very useful. Probably just some uninitialized
memory and an odd way of creating the object.

thanks
bye
	michael


On 12/19/18 5:20 AM, Alex Henrie wrote:
> This fixes the consistent test failures on Windows 7 and intermittent
> test failures on Windows 8.
> 
> Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
> --
> v2: Added missing comma and parenthesis
> ---
>  dlls/dmstyle/tests/dmstyle.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/dlls/dmstyle/tests/dmstyle.c b/dlls/dmstyle/tests/dmstyle.c
> index 245424c649..308ca9ba61 100644
> --- a/dlls/dmstyle/tests/dmstyle.c
> +++ b/dlls/dmstyle/tests/dmstyle.c
> @@ -456,9 +456,8 @@ static void test_parsedescriptor(void)
>      /* Nothing loaded */
>      hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
>      ok(hr == S_OK, "GetDescriptor failed: %08x, expected S_OK\n", hr);
> -    ok(desc.dwValidData == DMUS_OBJ_CLASS /* XP */ ||
> -            broken(desc.dwValidData == (DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS)), /* Vista and above */
> -            "Got valid data %#x, expected DMUS_OBJ_OBJECT\n", desc.dwValidData);
> +    ok((desc.dwValidData & ~(DMUS_OBJ_OBJECT | DMUS_OBJ_VERSION)) == DMUS_OBJ_CLASS,
> +            "Got valid data %#x, expected DMUS_OBJ_CLASS\n", desc.dwValidData);
>      ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicStyle),
>              "Got class guid %s, expected CLSID_DirectMusicStyle\n",
>              wine_dbgstr_guid(&desc.guidClass));
> 




More information about the wine-devel mailing list