[(try 3) 3/3] opengl32/tests: Improve test for wglMakeCurrent.

Paul Vriens paul.vriens.wine at gmail.com
Sat Sep 19 06:37:32 CDT 2009


On 09/19/2009 01:15 PM, Rico Schüller wrote:
> Am 19.09.2009 12:46, schrieb Paul Vriens:
>> On 09/19/2009 12:29 PM, Rico Schüller wrote:
>>> ---
>>> dlls/opengl32/tests/opengl.c | 10 ++++++++++
>>> 1 files changed, 10 insertions(+), 0 deletions(-)
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>
>> + ret = wglMakeCurrent( NULL, NULL );
>> + ok( !ret, "wglMakeCurrent failed\n" );
>>
>> shouldn't that message read "wglMakeCurrent succeeded" ?
> Yes, probably something like "wglMakeCurrent succeeded, but should
> fail!" is really a better solution.
>
>>
>> If you are testing the last error it's usually a good idea to set the
>> last error before the call (aka "SetLastError(0xdeadbeef)").
>>
> I haven't called SetLastError() before, because it's not done in the
> rest of the tests in dlls/opengl32/tests/opengl.c . But if it is usually
> a good idea, I could change that, too.

The main reason being that you don't know if the last error was set or 
changed unless you know what is was before.

-- 
Cheers,

Paul.



More information about the wine-devel mailing list