[PATCH 1/2] kernel32/tests: Add a test case for calling TlsFree on a freed index.

Nikolay Sivov bunglehead at gmail.com
Tue Mar 2 14:22:05 CST 2010


On 3/2/2010 23:04, Reece Dunn wrote:
> Hi,
>
> TlsFree should return FALSE if there wasn't a TLS slot of the
> specified index allocated, as well as returning
> ERROR_INVALID_PARAMETER.
>
> - Reece
>    

> -  ok(TlsFree(tlsIndex)!=0,"TlsFree failed\n");
> +  ok(TlsFree(tlsIndex)!=0,"TlsFree failed: %08x\n", GetLastError());
> +  /* Test freeing an already freed TLS index */
> +  ok(TlsFree(tlsIndex)==0,"TlsFree succeeded\n");
> +  ok(GetLastError()==ERROR_INVALID_PARAMETER,
> +     "GetLastError: expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError());
>    
You need reset last error to something before test.



More information about the wine-devel mailing list