-----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.