Commit c898503e authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

mscoree/tests: Trace the error when a Windows API fails.

parent 632c8cfd
...@@ -102,7 +102,7 @@ static BOOL compile_cs_to_dll(char *source_path, char *dest_path) ...@@ -102,7 +102,7 @@ static BOOL compile_cs_to_dll(char *source_path, char *dest_path)
ok(ret, "Compilation failed\n"); ok(ret, "Compilation failed\n");
ret = MoveFileA(path_temp, dest_path); ret = MoveFileA(path_temp, dest_path);
ok(ret, "Moving temporary file failed\n"); ok(ret, "Could not move %s to %s: %lu\n", path_temp, dest_path, GetLastError());
return ret; return ret;
} }
......
...@@ -148,7 +148,7 @@ static BOOL runtime_is_usable(void) ...@@ -148,7 +148,7 @@ static BOOL runtime_is_usable(void)
si.cb = sizeof(si); si.cb = sizeof(si);
ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
ok(ret, "CreateProcessA failed\n"); ok(ret, "Could not create process: %lu\n", GetLastError());
if (!ret) if (!ret)
return FALSE; return FALSE;
...@@ -159,7 +159,7 @@ static BOOL runtime_is_usable(void) ...@@ -159,7 +159,7 @@ static BOOL runtime_is_usable(void)
ret = GetExitCodeProcess(pi.hProcess, &exitcode); ret = GetExitCodeProcess(pi.hProcess, &exitcode);
CloseHandle(pi.hProcess); CloseHandle(pi.hProcess);
ok(ret, "GetExitCodeProcess failed\n"); ok(ret, "GetExitCodeProcess failed: %lu\n", GetLastError());
if (!ret || exitcode != 0) if (!ret || exitcode != 0)
{ {
...@@ -424,7 +424,7 @@ static void create_xml_file(LPCWSTR filename) ...@@ -424,7 +424,7 @@ static void create_xml_file(LPCWSTR filename)
DWORD dwNumberOfBytesWritten; DWORD dwNumberOfBytesWritten;
HANDLE hfile = CreateFileW(filename, GENERIC_WRITE, 0, NULL, HANDLE hfile = CreateFileW(filename, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
ok(hfile != INVALID_HANDLE_VALUE, "File creation failed\n"); ok(hfile != INVALID_HANDLE_VALUE, "Could not open %s for writing: %lu\n", wine_dbgstr_w(filename), GetLastError());
WriteFile(hfile, xmldata, sizeof(xmldata) - 1, &dwNumberOfBytesWritten, NULL); WriteFile(hfile, xmldata, sizeof(xmldata) - 1, &dwNumberOfBytesWritten, NULL);
CloseHandle(hfile); CloseHandle(hfile);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment