From e431d89ed2811496e3917523cda6c13083c3afb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Wed, 19 Dec 2012 20:34:03 +0100 Subject: [PATCH] kernel32/tests: Don't test function directly when reporting GetLastError(). --- dlls/kernel32/tests/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 3d29b28e700..0166fffa1bc 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -3296,7 +3296,8 @@ static void test_GetFileInformationByHandleEx(void) /* ensure the existence of a file in the temp folder */ ret2 = GetTempFileNameA(tempPath, "abc", 0, tempFileName); ok(ret2, "GetFileInformationByHandleEx: GetTempFileNameA failed, got error %u.\n", GetLastError()); - ok(GetFileAttributesA(tempFileName) != INVALID_FILE_ATTRIBUTES, "GetFileInformationByHandleEx: " + ret2 = GetFileAttributesA(tempFileName); + ok(ret2 != INVALID_FILE_ATTRIBUTES, "GetFileInformationByHandleEx: " "GetFileAttributesA failed to find the temp file, got error %u.\n", GetLastError()); directory = CreateFileA(tempPath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, @@ -3359,7 +3360,8 @@ static void test_OpenFileById(void) /* ensure the existence of a file in the temp folder */ ret2 = GetTempFileNameA(tempPath, "abc", 0, tempFileName); ok(ret2, "OpenFileById: GetTempFileNameA failed, got error %u.\n", GetLastError()); - ok(GetFileAttributesA(tempFileName) != INVALID_FILE_ATTRIBUTES, + ret2 = GetFileAttributesA(tempFileName); + ok(ret2 != INVALID_FILE_ATTRIBUTES, "OpenFileById: GetFileAttributesA failed to find the temp file, got error %u\n", GetLastError()); ret2 = MultiByteToWideChar(CP_ACP, 0, tempFileName + strlen(tempPath), -1, tempFileNameW, sizeof(tempFileNameW)/sizeof(tempFileNameW[0]));