Fix to exceptions in ddtest

Chris Ahrendt celticht32 at aol.com
Mon Oct 13 07:36:17 CDT 2008


Marcus Meissner wrote:
> On Sun, Oct 12, 2008 at 09:52:06PM -0400, Chris Ahrendt wrote:
>> Ok I have threaded through ddraw_test adding as I had them  fail a check 
>> and a fix in dsurface.c test. The test now fails when the CreateSurface 
>> fails. Before this there were several point in the test where the return 
>> status was not checked. As I encountered them and they failed with an 
>> exception I added the failure I found at other parts which did the create 
>> surface. For some reason a 3rd and 4th surface fails on ATI.
>>
>> Addached you will find the proposed fix.
>> I also found a point where  the code did not skip but did a goto to the 
>> error point  with the variables unitialised.
>>
>>
>> Chris
> 
>> >From 52071bddae683a1964d64be0acbfec8d7b2c2c5e Mon Sep 17 00:00:00 2001
>> From: Chris Ahrendt <celticht32 at aol.com>
>> Date: Sun, 12 Oct 2008 21:44:21 -0400
>> Subject: [PATCH] Fix to ddtest to fail test if IDirectDraw_CreateSurface failed.
>>  Create Surface was failing and setting the handle to the surface to null.
>>  So when the free / release was called it threw an exception instead of failing the test.
>>
>> ---
>>      ok(rc==DDERR_INVALIDPARAMS,"CreateSurface returned: %x\n",rc);
>> -
>> +    if (FAILED(rc)) {
>> +       skip("failed to create surface\n");
>> +       return;
>> +      }
> 
> here it is _expected_ that the surface creation fails. So this code is not
> useful. ALso in other places.
> 
> ciao, Marcus
Ok  that I can fix easy enough...

chris



More information about the wine-devel mailing list