kernel32: Additional SetThreadPriorityTest (try 5)

James Hawkins truiken at gmail.com
Tue Jul 24 14:57:28 CDT 2007


On 7/24/07, Matt Jones <mattj at google.com> wrote:
> On 7/24/07, Matt Jones <mattj at 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



More information about the wine-devel mailing list