[1/5] msi/tests: Check the result of get_system_dirs and get_user_dirs.

Hans Leidekker hans at codeweavers.com
Mon Mar 7 05:39:35 CST 2011


---
 dlls/msi/tests/action.c  |    6 +++---
 dlls/msi/tests/install.c |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index f7919a4..84750d5 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -2138,7 +2138,7 @@ static BOOL get_system_dirs(void)
 
     RegCloseKey(hkey);
 
-    if(GetWindowsDirectoryA(WINDOWS_DIR, MAX_PATH) != ERROR_SUCCESS)
+    if (!GetWindowsDirectoryA(WINDOWS_DIR, MAX_PATH))
         return FALSE;
 
     return TRUE;
@@ -6016,8 +6016,8 @@ START_TEST(action)
     if(len && (CURR_DIR[len - 1] == '\\'))
         CURR_DIR[len - 1] = 0;
 
-    get_system_dirs();
-    get_user_dirs();
+    ok(get_system_dirs(), "failed to retrieve system dirs\n");
+    ok(get_user_dirs(), "failed to retrieve user dirs\n");
 
     /* Create a restore point ourselves so we circumvent the multitude of restore points
      * that would have been created by all the installation and removal tests.
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 1ae39d4..ea5431a 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -2205,7 +2205,7 @@ static BOOL get_system_dirs(void)
 
     RegCloseKey(hkey);
 
-    if(GetWindowsDirectoryA(WINDOWS_DIR, MAX_PATH) != ERROR_SUCCESS)
+    if(!GetWindowsDirectoryA(WINDOWS_DIR, MAX_PATH))
         return FALSE;
 
     return TRUE;
@@ -6371,8 +6371,8 @@ START_TEST(install)
     if(len && (CURR_DIR[len - 1] == '\\'))
         CURR_DIR[len - 1] = 0;
 
-    get_system_dirs();
-    get_user_dirs();
+    ok(get_system_dirs(), "failed to retrieve system dirs\n");
+    ok(get_user_dirs(), "failed to retrieve user dirs\n");
 
     /* Create a restore point ourselves so we circumvent the multitude of restore points
      * that would have been created by all the installation and removal tests.
-- 
1.7.1







More information about the wine-patches mailing list