On 23/01/2008, Paul Vriens paul.vriens.wine@gmail.com wrote:
Hi,
Currently the install test fail/crash on at least win95 and NT4. The main reason I found was that pMsiQueryComponentStateA and pMsiSourceListGetInfoA are not guarded.
Does it makes sense to guard every instance of these calls and just continue:
if (pMsiSourceListGetInfoA) { call test outcome }
or should we skip the whole subtest when the function is not available.
It depends on what the test is doing. If the test needs the result of that function to run the remainder of the sub-test, it shoud skip the remainder of the sub-test (preferably with some information on why the test is skipped). If the test is only using that function to get some extended information, then each instance needs to be guarded.
In general, i suspect that most of these will result in the sub-test being skipped (especially if that function is what is being tested).
As for any helper macros, in the case where the sub-test is skipped, a macro could be created to simplify this. Apart from that, I don't know of anything to simplify it. Besides, having the conditional for non-skipping sub-tests makes it explicit what the codepath is.
- Reece