André Hentschel : msi/tests: Don' t test function directly when reporting GetLastError().
Alexandre Julliard
julliard at winehq.org
Thu Dec 30 10:49:57 CST 2010
Module: wine
Branch: master
Commit: 648025881f44e36440332e033be047184627bc93
URL: http://source.winehq.org/git/wine.git/?a=commit;h=648025881f44e36440332e033be047184627bc93
Author: André Hentschel <nerv at dawncrow.de>
Date: Thu Dec 30 02:40:43 2010 +0100
msi/tests: Don't test function directly when reporting GetLastError().
---
dlls/msi/tests/automation.c | 3 ++-
dlls/msi/tests/install.c | 9 +++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index 49cdca3..46178b8 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -2103,7 +2103,8 @@ static void test_Installer_RegistryValue(void)
"RegSetValueExW failed\n");
ok(!RegSetValueExW(hkey,szThree,0,REG_BINARY, (const BYTE *)qw, 4),
"RegSetValueExW failed\n");
- ok(SetEnvironmentVariableA("MSITEST", "Four"), "SetEnvironmentVariableA failed %d\n", GetLastError());
+ bRet = SetEnvironmentVariableA("MSITEST", "Four");
+ ok(bRet, "SetEnvironmentVariableA failed %d\n", GetLastError());
ok(!RegSetValueExW(hkey,szFour,0,REG_EXPAND_SZ, (const BYTE *)szExpand, sizeof(szExpand)),
"RegSetValueExW failed\n");
ok(!RegSetValueExW(hkey,szFive,0,REG_MULTI_SZ, (const BYTE *)szFive, sizeof(szFive)),
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index ad5a355..5461387 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -5546,6 +5546,7 @@ static void process_pending_renames(HKEY hkey)
for (src = buf; *src; src = dst + strlen(dst) + 1)
{
DWORD flags = MOVEFILE_COPY_ALLOWED;
+ BOOL fileret;
dst = src + strlen(src) + 1;
@@ -5573,10 +5574,14 @@ static void process_pending_renames(HKEY hkey)
if (*dst)
{
if (dst[0] == '\\' && dst[1] == '?' && dst[2] == '?' && dst[3] == '\\') dst += 4;
- ok(MoveFileExA(src, dst, flags), "Failed to move file %s -> %s (%u)\n", src, dst, GetLastError());
+ fileret = MoveFileExA(src, dst, flags);
+ ok(fileret, "Failed to move file %s -> %s (%u)\n", src, dst, GetLastError());
}
else
- ok(DeleteFileA(src), "Failed to delete file %s (%u)\n", src, GetLastError());
+ {
+ fileret = DeleteFileA(src);
+ ok(fileret, "Failed to delete file %s (%u)\n", src, GetLastError());
+ }
}
ok(found, "Expected a 'msitest' entry\n");
More information about the wine-cvs
mailing list