[PATCH 3/4] d3drm/tests: Add QueryInterface tests for IDirect3DRMFrame{1-3}

Stefan Dösinger stefandoesinger at gmail.com
Thu Apr 9 16:34:18 CDT 2015


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

Am 2015-04-09 um 16:11 schrieb Aaryaman Vasishta:
> +static void test_frame1_qi(void)
> +{
> ...
> +    test_qi("frame_qi", (IUnknown *)frame, &IID_IDirect3DRMFrame, tests, sizeof(tests) / sizeof(*tests));
> ...
> +static void test_frame2_qi(void)
> +{
> ...
> +    test_qi("frame_qi", (IUnknown *)frame2, &IID_IDirect3DRMFrame2, tests, sizeof(tests) / sizeof(*tests));
> ...
> +static void test_frame3_qi(void)
> +{
> ...
> +    test_qi("frame_qi", (IUnknown *)frame3, &IID_IDirect3DRMFrame3, tests, sizeof(tests) / sizeof(*tests));
With this it won't be possible to find out which test failed if
something fails. Please use more informative names for the test_name
parameter of test_qi, e.g. "frame1_qi", "frame2_qi" and "frame3_qi".

It is a bit unfortunate that you have to duplicate the big structure 3
times. You could in theory share it between the different functions, but
then you'd have to lie about which interface you pass to test_qi, and I
am not sure if this is nicer. If you can't find a better solution keep
it the way it currently is.

@Alexandre: The reason why I want to test all interface versions is our
experience with ddraw. It has plenty of interface-specific behaviors,
some of them depend on which version is called, and some of them depend
on which version was used to create the object. (see struct
ddraw_surface::version, struct ddraw::version and struct
d3d_device::version, as well as various thunks). For this particular
test the relevant information is that all interfaces can be queried from
all object versions and that there are no refcounting differences, which
could be introduced by the presumably aggregated IDirect3DRMObject2
interface.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJVJvBaAAoJEN0/YqbEcdMwXYEP/2k4k4qdiGA2sxdv0S6mTaZW
RXEPGDY1BqtDyOlw9EzwK+EmQTnE6B4zC25AM55yFAQjaIs8UyAk/TN3b0K+H9xz
ZJJIgqGe2x+yIrzKqT70lGqUltYMaENHEw3oh8GdkYnIIK97bG7Y7vK7VZKIDPlh
vfxcwG990di77KyPTt3eI4w6BQp4SyyEUxNC5vCy213ML+sF9XjGV+WPkV0UStcX
nNCLRcszExminklJgEj4h1S6qcxNVIwJks8vCrgRx9isJfmbK8g5GrAzod3iTSES
K1ccZWxGFbXupiT8Je6K5Te6b2PlHZtBVVHb5ndeYQdZJmwZIrTFbE3LjX3o2Vyt
m0DvbPzAzNNJO7jREtWVSDXmg2OIaxsaIlMpH+v7VU2csqLNQZCijJ9/q3hN2qLf
rYIS7i2fAmWDUoE6uFDOs+VJKDx88OljZaBTV4VFAHYwfeiqr3KXVdYZ3lciViif
gjfno0N20inhG/ydjmJOn+tMipj2p1iffHDMaIlXVFhxitTj2Kk/bYp5b65T5q0C
dn99clpZKU8xKg8w1I6MQv03CvMla0Z5k5d01H6YCW0YDSHtSnxfXeykxN2PeCGZ
wYkTxF/KeSXhg3tLkl7StD1aRJsa5lv98FnJmQA2UWDNlcPfHcvv0Dam8ZsRohEr
pPvj1H5GMcaaDGhfCOiZ
=Eore
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list