[1/2] ddraw: add dsurface dimension tests, try 12

Stefan Dösinger stefandoesinger at gmail.com
Sun Nov 2 08:58:12 CST 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

First of all, thanks for your endurance with this. I know our pickiness can be exhausting.

Am 2014-10-30 19:39, schrieb Patrick Rudolph:
> +    ddcaps.dwSize = sizeof(DDCAPS);
> +    hr = IDirectDraw_GetCaps(ddraw, &ddcaps, NULL);
> +    ok(SUCCEEDED(hr), "IDirectDraw_GetCaps failed, hr %#x.\n", hr);
You are never reading ddcaps. I suspect it is a leftover from the now-removed out of (video)memory tests.

> +            surfacedesc.dwFlags = tests[i].flags | DDSD_PIXELFORMAT;
You are already setting DDSD_PIXELFORMAT in all of tests[i].flags, there's no need to set it twice. Remove one of them, preferably the one in tests[].flags. You can move DDSD_CAPS as well. Henri mentioned the same issue in his feedback.

The rest are some minor style issues, but please fix them as well:

> +    DWORD i,j;
I'd prefer unsigned int i, j, but that's not a strong opinion.

> +                todo_wine ok(hr == tests[i].hr || broken(hr == DDERR_INVALIDPARAMS), "Pixelformat %s, test %d returned %08x\n", formats[j].name, i, hr);
i is unsigned, print it with %u.

> +    hr = IDirectDraw_CreateSurface(ddraw, &surfacedesc, &surface, NULL);
> +    ok(SUCCEEDED(hr), "CreateSurface returned %08x\n", hr);
> +
> +    hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surfacedesc);
> +    ok(SUCCEEDED(hr), "GetSurfaceDesc returned %x\n", hr);
Please be consistent with the format you use. Tests added in recent years use %#x, I recommend to use this.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJUVkaEAAoJEN0/YqbEcdMwPVoQAJTppEl15dBZ6uVCBmOYEzbg
W5GYcDfdjv9/j4S6cVyHh0wKQF7eoHBdVelF8IvE47rBGBoe63YZnOuozEN1JPNL
7buCVNBof+1WytRAZacIyu9O4Vbs2bLXgGlGqo4T0baQbQMKoH/gQnyEXcxmJR6s
egElATCH1RvInllwuIPbtSr+RcmH+m8Tk9LRzHNU6gKcXNwdNv1iicQaD+wF3S2F
+iG7va1Sy6ubeDHEX8CE3EMhHyFmcZZlsqk2G6AVJcj914+I8VNua69XVCujkdaH
atkZQ1bS8HQ9nzfrc+X7G5CI6ZsGfO2UA8mtjl1rf8OzoCgCZ8lZmjdhgD40iQVX
boFXmsFGMZAYDVxu/aUX2qD4NtBkE4TlF9JVy8UA0QMWd1DN1SyjO77lp6197VGV
bAaDhjID8bUyaTc6m314eOiKMuM+2Nyt6aGwT87uyTffKCM2Eyt692tB3xWH6IqT
nJpctMa724qOoAmRL5jca99uDTrn6iKkUa7m8hMXgRQEjyQvd9fm+wbNmRrxGfmA
59IwxFHF5IKTsQVbkDaLvXfU2n9ubvA0cyXRFAP1YLI9pDKq1/I3ORmToYIJ0D6O
k7AqX0/7nrnu0uJEDhP3/AsTMs2Ldvh1MavNxUIWOcDK4PCc/Ga9PBc6ubX4FQGI
i3iQC8eR0aQrlYAr5lvj
=6YE6
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list