[PATCH 1/2] setupapi/tests: Add error tests for SetupDiDestroyDeviceInfoList.

Zebediah Figura z.figura12 at gmail.com
Sat Jun 6 23:38:26 CDT 2020


On 6/6/20 11:45 PM, Dmitry Timoshkov wrote:
> Jeff Smith <whydoubt at gmail.com> wrote:
> 
>> +    SetLastError(0xcafef00d);
> 
> Please use a commonly accepted value of 0xdeadbeef.

Is this really worthwhile? It's pretty obvious that both are sentinel 
values.

> 
>> +    ret = SetupDiDestroyDeviceInfoList(set);
>> +    ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError());
>> +    todo_wine ok(!ret || !GetLastError(), "Got unexpected error %#x.\n", GetLastError());
> 
> These two ok() calls contradict each other (here and in other places).
> ok() should accept either ret or !ret, last error should be tested
> separately.
> 




More information about the wine-devel mailing list