lz32: remove dead code from the LZOpenFileW test.

Detlef Riekenberg wine.dev at web.de
Tue Jun 20 10:37:27 CDT 2006


Saulius Krasuckas wrote:

> +  ok(file >= 0, "LZOpenFileW failed on switching to a compressed file name\n");
..
> +  ok(test.nErrCode == 0, "LZOpenFileW set test.nErrCode to %d\n", 
> +     test.nErrCode);

Did you mean "test.nErrCode == ERROR_SUCCESS"?
You test the Errorcode here, but you did not use SetLastError() before
LZOpenFileW.


> +  ok(lstrcmpA(test.szPathName, expected) == 0, 
> +     "LZOpenFileW returned '%s', but was expected to return '%s'\n", 
> +     test.szPathName, expected);

This is strange: An ANSI-Compare for an UNICODE-Function.
After reading the source and OFSTRUCT, this is correct.
I suggest a command before the above "ok()".

An extra Patch with the WINAPI-Documentation for the Implementation
would be nice.
This should include a note, that the ANSI-String "szPathName" in
"OFSTRUCT" is the correct Parameter for the UNICODE-Implementation.


---- cut ----


This part from your previous Patch is already in the tree, but:


>  
> +  /* Delete the file then make sure it doesn't exist anymore. */ 
> +  file = LZOpenFileW(filename_W, &test, OF_DELETE);
> +  ok(file >= 0, "LZOpenFileA failed on delete\n");

> +  retval = GetFileAttributesW(filename_W);
> +  ok(retval == INVALID_FILE_ATTRIBUTES, 
> +     "GetFileAttributesA succeeded on deleted file\n");

The Messages in the "W"-Tests have ANSI Function-Names


-- 
By By ...
      ... Detlef




More information about the wine-devel mailing list