=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: shell32/tests: Don' t test function directly when reporting GetLastError().

Alexandre Julliard julliard at winehq.org
Mon Sep 26 16:15:13 CDT 2011


Module: wine
Branch: master
Commit: 8b0a2c287215aee1b4138f64e01cbda960f17ace
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8b0a2c287215aee1b4138f64e01cbda960f17ace

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sun Sep 25 20:30:42 2011 +0200

shell32/tests: Don't test function directly when reporting GetLastError().

---

 dlls/shell32/tests/shlfolder.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index fb634b4..c61a972 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -3784,12 +3784,15 @@ if (0)
     if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE;
     if (is_wow64 && pGetSystemWow64DirectoryW)
     {
+        UINT len;
         *dirW = 0;
-        ok(GetSystemDirectoryW(dirW, MAX_PATH) > 0, "GetSystemDirectoryW failed: %u\n", GetLastError());
+        len = GetSystemDirectoryW(dirW, MAX_PATH);
+        ok(len > 0, "GetSystemDirectoryW failed: %u\n", GetLastError());
         hr = pSHParseDisplayName(dirW, NULL, &pidl1, 0, NULL);
         ok(hr == S_OK, "failed %08x\n", hr);
         *dirW = 0;
-        ok(pGetSystemWow64DirectoryW(dirW, MAX_PATH) > 0, "GetSystemWow64DirectoryW failed: %u\n", GetLastError());
+        len = pGetSystemWow64DirectoryW(dirW, MAX_PATH);
+        ok(len > 0, "GetSystemWow64DirectoryW failed: %u\n", GetLastError());
         hr = pSHParseDisplayName(dirW, NULL, &pidl2, 0, NULL);
         ok(hr == S_OK, "failed %08x\n", hr);
         ret = pILIsEqual(pidl1, pidl2);




More information about the wine-cvs mailing list