mpr/tests: Сheck the return values of the WNetGetUniversalNameA. (try 2)
Nikolay Sivov
bunglehead at gmail.com
Fri Jul 20 12:49:56 CDT 2012
On 7/20/2012 16:02, Roman Dadkov wrote:
> This patch adds additional check for the returned results in the test
> for the function WNetGetUniversalNameA.
> The following cases are checked:
> 1 transmission of an incorrect buffer size
> 2 transmission of an incorrect buffer pointer
> 3 transmission path to the file
> Similar checks are carried out to call a function with parameter
> REMOTE_NAME_INFO_LEVEL.
>
> + fail_size = sizeof(driveA) / sizeof(char) - 1; // buffer size is less than the path
I don't know if this will be accepted as is, but anyway don't use cpp
style comments in future.
> + if(drive_type == DRIVE_REMOTE)
> + todo_wine ok(ret == WN_NO_ERROR, "WNetGetUniversalNameW failed: %08x\n", ret);
> + else
> + todo_wine ok(ret == ERROR_NOT_CONNECTED, "WNetGetUniversalNameW gave wrong error: %08x\n", ret);
>
This is mostly matter of taste but in such cases you can use todo_wine
{} and place all test call inside.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20120720/5332eaee/attachment-0001.html>
More information about the wine-devel
mailing list