lz32: remove dead code from the LZOpenFileW test.

Saulius Krasuckas saulius.krasuckas at ieee.org
Mon Jun 19 19:41:23 CDT 2006


Fixing copy&paste bug.

---

 dlls/lz32/tests/lzexpand_main.c |   27 +++++++++------------------
 1 files changed, 9 insertions(+), 18 deletions(-)

d5d59e41b8edb61c91d84c1232fd473ad6803350
diff --git a/dlls/lz32/tests/lzexpand_main.c b/dlls/lz32/tests/lzexpand_main.c
index 73a1f41..fb91541 100644
--- a/dlls/lz32/tests/lzexpand_main.c
+++ b/dlls/lz32/tests/lzexpand_main.c
@@ -285,24 +285,15 @@ static void test_LZOpenFileW(void)
 
   /* Try to open compressed file. */
   file = LZOpenFileW(filenameW, &test, OF_EXIST);
-  if(file != LZERROR_BADINHANDLE) {
-    ok(test.cBytes == sizeof(OFSTRUCT), 
-       "LZOpenFileW set test.cBytes to %d\n", test.cBytes);
-    ok(test.nErrCode == 0, "LZOpenFileW set test.nErrCode to %d\n", 
-       test.nErrCode);
-    ok(lstrcmpA(test.szPathName, expected) == 0, 
-       "LZOpenFileW returned '%s', but was expected to return '%s'\n", 
-       test.szPathName, expected);
-    LZClose(file);
-  } else {
-    ok(test.cBytes == 0xA5, 
-       "LZOpenFileW set test.cBytes to %d\n", test.cBytes);
-    ok(test.nErrCode == ERROR_FILE_NOT_FOUND, 
-       "LZOpenFileW set test.nErrCode to %d\n", test.nErrCode);
-    ok(strncmp(test.szPathName, filled_0xA5, OFS_MAXPATHNAME) == 0, 
-       "LZOpenFileW returned '%s', but was expected to return '%s'\n", 
-       test.szPathName, filled_0xA5);
-  }
+  ok(file >= 0, "LZOpenFileW failed on switching to a compressed file name\n");
+  ok(test.cBytes == sizeof(OFSTRUCT), 
+     "LZOpenFileW set test.cBytes to %d\n", test.cBytes);
+  ok(test.nErrCode == 0, "LZOpenFileW set test.nErrCode to %d\n", 
+     test.nErrCode);
+  ok(lstrcmpA(test.szPathName, expected) == 0, 
+     "LZOpenFileW returned '%s', but was expected to return '%s'\n", 
+     test.szPathName, expected);
+  LZClose(file);
 
   /* Delete the file then make sure it doesn't exist anymore. */
   file = LZOpenFileW(filename_W, &test, OF_DELETE);
-- 
1.3.3



More information about the wine-patches mailing list