Re: kernel32: Additional SetThreadPriorityTest (try 5)
On 7/24/07, Matt Jones <mattj(a)google.com> wrote:
On 7/24/07, Matt Jones <mattj(a)google.com> wrote:
Correctly checks return code of SetThreadPriority before checking error (address comment by Alexandre)
+ SetThreadPriority(curthread,min_priority); + result = SetThreadPriority(curthread,min_priority-1); + + if (!result) exitCode = GetLastError(); + else exitCode = ERROR_SUCCESS; + + todo_wine { + ok(exitCode == ERROR_INVALID_PARAMETER, You're going about this a weird way, and you're still not testing the value returned. The standard way to test return results and GetLastError value is like so: SetLastError(0xdeadbeef); r = ApiCall(...); ok(r == FALSE/ERROR/blah, "Expected blah, got %d\n", r); ok(GetLastError() == error, "Expected error, got %d\n", GetLastError()); -- James Hawkins
participants (1)
-
James Hawkins