Commit b73e3102 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

setupapi/tests: Enable compilation with long types.

parent 0e4c1084
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = setupapi.dll
IMPORTS = advapi32 cabinet ole32 setupapi shell32 uuid user32
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -42,13 +42,13 @@ static void test_SetupPromptForDiskA(void)
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, buffer, sizeof(buffer) - 1, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
ok(length == strlen(path) + 1, "Expect length %u, got %u\n", lstrlenA(path) + 1, length);
ok(length == strlen(path) + 1, "Expect length %u, got %lu\n", lstrlenA(path) + 1, length);
ok(!strcmp(path, buffer), "Expected path %s, got %s\n", debugstr_a(path), debugstr_a(buffer));
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, NULL, 0, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %d\n", ret);
ok(length == strlen(path) + 1, "Expect length %u, got %u\n", lstrlenA(path) + 1, length);
ok(length == strlen(path) + 1, "Expect length %u, got %lu\n", lstrlenA(path) + 1, length);
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, buffer, 1, &length);
......@@ -61,7 +61,7 @@ static void test_SetupPromptForDiskA(void)
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, buffer, strlen(path) + 1, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
ok(length == strlen(path) + 1, "Expect length %u, got %u\n", lstrlenA(path) + 1, length);
ok(length == strlen(path) + 1, "Expect length %u, got %lu\n", lstrlenA(path) + 1, length);
ok(!strcmp(path, buffer), "Expected path %s, got %s\n", debugstr_a(path), debugstr_a(buffer));
}
......@@ -77,13 +77,13 @@ static void test_SetupPromptForDiskW(void)
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, buffer, ARRAY_SIZE(buffer) - 1, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %u\n", lstrlenW(path) + 1, length);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %lu\n", lstrlenW(path) + 1, length);
ok(!lstrcmpW(path, buffer), "Expected path %s, got %s\n", debugstr_w(path), debugstr_w(buffer));
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, NULL, 0, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %d\n", ret);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %u\n", lstrlenW(path) + 1, length);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %lu\n", lstrlenW(path) + 1, length);
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, buffer, 1, &length);
......@@ -96,7 +96,7 @@ static void test_SetupPromptForDiskW(void)
memset(buffer, 0, sizeof(buffer));
ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, buffer, lstrlenW(path) + 1, &length);
ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %u\n", lstrlenW(path) + 1, length);
ok(length == lstrlenW(path) + 1, "Expect length %u, got %lu\n", lstrlenW(path) + 1, length);
ok(!lstrcmpW(path, buffer), "Expected path %s, got %s\n", debugstr_w(path), debugstr_w(buffer));
}
......
......@@ -171,7 +171,7 @@ static void test_SetupGetInfInformation(void)
broken(GetLastError() == ERROR_PATH_NOT_FOUND) || /* NT4 */
broken(GetLastError() == ERROR_INVALID_NAME) || /* win2k */
broken(GetLastError() == ERROR_GENERAL_SYNTAX), /* another win2k / winMe */
"Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
"Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
/* try an invalid inf filename */
......@@ -185,7 +185,7 @@ static void test_SetupGetInfInformation(void)
ret = SetupGetInfInformationA(NULL, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size);
ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
"Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
}
......@@ -197,7 +197,7 @@ static void test_SetupGetInfInformation(void)
ret = SetupGetInfInformationA(inf_filename, -1, NULL, 0, &size);
ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
"Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
/* try a nonexistent inf file */
......@@ -206,7 +206,7 @@ static void test_SetupGetInfInformation(void)
ret = SetupGetInfInformationA("idontexist", INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size);
ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
"Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
/* successfully open the inf file */
......@@ -220,7 +220,7 @@ static void test_SetupGetInfInformation(void)
ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, size, &size);
ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
"Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* set ReturnBuffer to NULL and ReturnBufferSize to non-zero value 'size-1' */
ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, size-1, &size);
......@@ -241,7 +241,7 @@ static void test_SetupGetInfInformation(void)
ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, info, size - 1, &size);
ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
"Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
/* successfully get the inf information */
ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, info, size, &size);
......@@ -267,7 +267,7 @@ static void test_SetupGetInfInformation(void)
skip("need admin rights\n");
goto done;
}
ok(ret, "can't create inf file %u\n", GetLastError());
ok(ret, "can't create inf file %lu\n", GetLastError());
HeapFree(GetProcessHeap(), 0, info);
info = alloc_inf_info("test.inf", INFINFO_DEFAULT_SEARCH, &size);
......@@ -289,7 +289,7 @@ static void test_SetupGetInfInformation(void)
/* test the INFINFO_DEFAULT_SEARCH search flag */
ret = SetupGetInfInformationA("test.inf", INFINFO_DEFAULT_SEARCH, info, size, &size);
ok(ret == TRUE, "Expected SetupGetInfInformation to succeed: %d\n", GetLastError());
ok(ret == TRUE, "Expected SetupGetInfInformation to succeed: %ld\n", GetLastError());
ok(check_info_filename(info, inf_one), "Expected returned filename to be equal\n");
HeapFree(GetProcessHeap(), 0, info);
......@@ -330,7 +330,7 @@ static void test_SetupGetSourceFileLocation(void)
ret = SetupGetSourceFileLocationA(hinf, NULL, "lanconf.exe", &source_id, buffer, sizeof(buffer), &required);
ok(ret, "SetupGetSourceFileLocation failed\n");
ok(required == 1, "unexpected required size: %d\n", required);
ok(required == 1, "unexpected required size: %ld\n", required);
ok(source_id == 2, "unexpected source id: %d\n", source_id);
ok(!lstrcmpA("", buffer), "unexpected result string: %s\n", buffer);
......@@ -343,7 +343,7 @@ static void test_SetupGetSourceFileLocation(void)
hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL);
error = GetLastError();
ok(hinf == INVALID_HANDLE_VALUE, "could open inf file\n");
ok(error == ERROR_WRONG_INF_STYLE, "got wrong error: %d\n", error);
ok(error == ERROR_WRONG_INF_STYLE, "got wrong error: %ld\n", error);
hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_OLDNT, NULL);
ok(hinf != INVALID_HANDLE_VALUE, "could not open inf file\n");
......@@ -376,7 +376,7 @@ static void test_SetupGetSourceInfo(void)
ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_PATH, buffer, sizeof(buffer), &required);
ok(ret, "SetupGetSourceInfoA failed\n");
ok(required == 1, "unexpected required size: %d\n", required);
ok(required == 1, "unexpected required size: %ld\n", required);
ok(!lstrcmpA("", buffer), "unexpected result string: %s\n", buffer);
required = 0;
......@@ -385,7 +385,7 @@ static void test_SetupGetSourceInfo(void)
ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_TAGFILE, buffer, sizeof(buffer), &required);
ok(ret, "SetupGetSourceInfoA failed\n");
ok(required == 28, "unexpected required size: %d\n", required);
ok(required == 28, "unexpected required size: %ld\n", required);
ok(!lstrcmpA("LANCOM\\LANtools\\lanconf.cab", buffer), "unexpected result string: %s\n", buffer);
required = 0;
......@@ -394,7 +394,7 @@ static void test_SetupGetSourceInfo(void)
ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_DESCRIPTION, buffer, sizeof(buffer), &required);
ok(ret, "SetupGetSourceInfoA failed\n");
ok(required == 19, "unexpected required size: %d\n", required);
ok(required == 19, "unexpected required size: %ld\n", required);
ok(!lstrcmpA("LANCOM Software CD", buffer), "unexpected result string: %s\n", buffer);
SetupCloseInfFile(hinf);
......@@ -428,7 +428,7 @@ static void test_SetupGetTargetPath(void)
ret = SetupGetTargetPathA(hinf, &ctx, NULL, buffer, sizeof(buffer), &required);
ok(ret, "SetupGetTargetPathA failed\n");
ok(required == 10, "unexpected required size: %d\n", required);
ok(required == 10, "unexpected required size: %ld\n", required);
/* Retrieve the system drive from the windows directory.
* (%SystemDrive% is not available on Win9x)
*/
......@@ -452,7 +452,7 @@ static void test_SetupGetTargetPath(void)
lstrcpyA(destfile, WIN_DIR);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required);
ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf);
......@@ -470,7 +470,7 @@ static void test_SetupGetTargetPath(void)
GetSystemDirectoryA(destfile, MAX_PATH);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required);
ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf);
......@@ -488,7 +488,7 @@ static void test_SetupGetTargetPath(void)
lstrcpyA(destfile, WIN_DIR);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required);
ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf);
......@@ -506,7 +506,7 @@ static void test_SetupGetTargetPath(void)
lstrcpyA(destfile, WIN_DIR);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required);
ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required);
ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf);
......
......@@ -69,7 +69,7 @@ static void create_source_fileW(LPWSTR filename, const BYTE *data, DWORD size)
static UINT CALLBACK dummy_callbackA(PVOID Context, UINT Notification,
UINT_PTR Param1, UINT_PTR Param2)
{
ok(0, "Received unexpected notification (%p, %u, %lu, %lu)\n", Context,
ok(0, "Received unexpected notification (%p, %u, %Iu, %Iu)\n", Context,
Notification, Param1, Param2);
return 0;
}
......@@ -77,7 +77,7 @@ static UINT CALLBACK dummy_callbackA(PVOID Context, UINT Notification,
static UINT CALLBACK dummy_callbackW(PVOID Context, UINT Notification,
UINT_PTR Param1, UINT_PTR Param2)
{
ok(0, "Received unexpected notification (%p, %u, %lu, %lu)\n", Context,
ok(0, "Received unexpected notification (%p, %u, %Iu, %Iu)\n", Context,
Notification, Param1, Param2);
return 0;
}
......@@ -117,7 +117,7 @@ static void test_invalid_parametersA(void)
ok(!ret, "[%d] Expected SetupIterateCabinetA to return 0, got %d\n", i, ret);
todo_wine_if (invalid_parameters[i].todo_lasterror)
ok(GetLastError() == invalid_parameters[i].expected_lasterror,
"[%d] Expected GetLastError() to return %u, got %u\n",
"[%d] Expected GetLastError() to return %lu, got %lu\n",
i, invalid_parameters[i].expected_lasterror, GetLastError());
}
......@@ -126,7 +126,7 @@ static void test_invalid_parametersA(void)
ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
GetLastError() == ERROR_FILE_NOT_FOUND, /* Win9x/NT4/Win2k */
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n",
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
......@@ -134,7 +134,7 @@ static void test_invalid_parametersA(void)
ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
GetLastError() == ERROR_FILE_NOT_FOUND, /* Win9x/NT4/Win2k */
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n",
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n",
GetLastError());
DeleteFileA(source);
......@@ -183,7 +183,7 @@ static void test_invalid_parametersW(void)
ok(!ret, "[%d] Expected SetupIterateCabinetW to return 0, got %d\n", i, ret);
todo_wine_if (invalid_parameters[i].todo_lasterror)
ok(GetLastError() == invalid_parameters[i].expected_lasterror,
"[%d] Expected GetLastError() to return %u, got %u\n",
"[%d] Expected GetLastError() to return %lu, got %lu\n",
i, invalid_parameters[i].expected_lasterror, GetLastError());
}
......@@ -192,7 +192,7 @@ static void test_invalid_parametersW(void)
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_NOT_ENOUGH_MEMORY, /* Vista/Win2k8 */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
......@@ -200,7 +200,7 @@ static void test_invalid_parametersW(void)
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_NOT_ENOUGH_MEMORY, /* Vista/Win2k8 */
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
......@@ -208,7 +208,7 @@ static void test_invalid_parametersW(void)
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
GetLastError() == ERROR_FILE_NOT_FOUND, /* NT4/Win2k */
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n",
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
......@@ -216,7 +216,7 @@ static void test_invalid_parametersW(void)
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
GetLastError() == ERROR_FILE_NOT_FOUND, /* NT4/Win2k */
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n",
"Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n",
GetLastError());
DeleteFileW(source);
......@@ -250,14 +250,14 @@ static void test_invalid_callbackA(void)
ret = SetupIterateCabinetA(source, 0, NULL, NULL);
ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_DATA,
"Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = SetupIterateCabinetA(source, 0, crash_callbackA, NULL);
ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_DATA,
"Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n",
GetLastError());
DeleteFileA(source);
......@@ -284,14 +284,14 @@ static void test_invalid_callbackW(void)
ret = SetupIterateCabinetW(source, 0, NULL, NULL);
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_DATA,
"Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = SetupIterateCabinetW(source, 0, crash_callbackW, NULL);
ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_DATA,
"Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n",
"Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n",
GetLastError());
DeleteFileW(source);
......@@ -342,8 +342,8 @@ static UINT CALLBACK simple_callbackA(void *context, UINT message, UINT_PTR para
ok(index < ARRAY_SIZE(expected_files), "%u: Got unexpected file.\n", index);
ok(!strcmp(info->NameInCabinet, expected_files[index].nameA),
"%u: Got file name %s.\n", index, debugstr_a(info->NameInCabinet));
ok(info->FileSize == expected_files[index].size, "%u: Got file size %u.\n", index, info->FileSize);
ok(!info->Win32Error, "%u: Got error %u.\n", index, info->Win32Error);
ok(info->FileSize == expected_files[index].size, "%u: Got file size %lu.\n", index, info->FileSize);
ok(!info->Win32Error, "%u: Got error %lu.\n", index, info->Win32Error);
ok(info->DosDate == 14545, "%u: Got date %u.\n", index, info->DosDate);
ok(info->DosTime == 18672, "%u: Got time %u.\n", index, info->DosTime);
ok(info->DosAttribs == FILE_ATTRIBUTE_ARCHIVE, "%u: Got attributes %#x.\n", index, info->DosAttribs);
......@@ -410,12 +410,12 @@ static void test_simple_enumerationA(void)
{
snprintf(path, ARRAY_SIZE(path), "%s\\%s", temp, expected_files[i].nameA);
ret = DeleteFileA(path);
ok(ret, "Failed to delete %s, error %u.\n", debugstr_a(path), GetLastError());
ok(ret, "Failed to delete %s, error %lu.\n", debugstr_a(path), GetLastError());
}
snprintf(path, ARRAY_SIZE(path), "%s\\testcab.cab", temp);
ret = DeleteFileA(path);
ok(ret, "Failed to delete %s, error %u.\n", debugstr_a(path), GetLastError());
ok(ret, "Failed to delete %s, error %lu.\n", debugstr_a(path), GetLastError());
}
static UINT CALLBACK simple_callbackW(void *context, UINT message, UINT_PTR param1, UINT_PTR param2)
......@@ -450,8 +450,8 @@ static UINT CALLBACK simple_callbackW(void *context, UINT message, UINT_PTR para
ok(index < ARRAY_SIZE(expected_files), "%u: Got unexpected file.\n", index);
ok(!wcscmp(info->NameInCabinet, expected_files[index].nameW),
"%u: Got file name %s.\n", index, debugstr_w(info->NameInCabinet));
ok(info->FileSize == expected_files[index].size, "%u: Got file size %u.\n", index, info->FileSize);
ok(!info->Win32Error, "%u: Got error %u.\n", index, info->Win32Error);
ok(info->FileSize == expected_files[index].size, "%u: Got file size %lu.\n", index, info->FileSize);
ok(!info->Win32Error, "%u: Got error %lu.\n", index, info->Win32Error);
ok(info->DosDate == 14545, "%u: Got date %u.\n", index, info->DosDate);
ok(info->DosTime == 18672, "%u: Got time %u.\n", index, info->DosTime);
ok(info->DosAttribs == FILE_ATTRIBUTE_ARCHIVE, "%u: Got attributes %#x.\n", index, info->DosAttribs);
......@@ -518,12 +518,12 @@ static void test_simple_enumerationW(void)
{
swprintf(path, ARRAY_SIZE(path), L"%s\\%s", temp, expected_files[i].nameW);
ret = DeleteFileW(path);
ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(path), GetLastError());
ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(path), GetLastError());
}
swprintf(path, ARRAY_SIZE(path), L"%s\\testcab.cab", temp);
ret = DeleteFileW(path);
ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(path), GetLastError());
ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(path), GetLastError());
}
START_TEST(setupcab)
......
......@@ -87,15 +87,15 @@ static void test_StringTableAddString(void)
retval=pStringTableAddString(table,String,0);
ok(retval!=-1,"Failed to add String to String Table\n");
ok(hstring==retval,"string handle %x != String handle %x in String Table\n", hstring, retval);
ok(hstring==retval,"string handle %lx != String handle %lx in String Table\n", hstring, retval);
hfoo=pStringTableAddString(table,foo,0);
ok(hfoo!=-1,"Failed to add foo to String Table\n");
ok(hfoo!=hstring,"foo and string share the same ID %x in String Table\n", hfoo);
ok(hfoo!=hstring,"foo and string share the same ID %lx in String Table\n", hfoo);
/* case sensitive */
hString=pStringTableAddString(table,String,ST_CASE_SENSITIVE_COMPARE);
ok(hstring!=hString,"String handle and string share same ID %x in Table\n", hstring);
ok(hstring!=hString,"String handle and string share same ID %lx in Table\n", hstring);
pStringTableDestroy(table);
}
......@@ -115,15 +115,15 @@ static void test_StringTableAddStringEx(void)
retval = pStringTableAddStringEx(table, String, 0, NULL, 0);
ok(retval != -1, "Failed to add String to String Table\n");
ok(hstring == retval, "string handle %x != String handle %x in String Table\n", hstring, retval);
ok(hstring == retval, "string handle %lx != String handle %lx in String Table\n", hstring, retval);
hfoo = pStringTableAddStringEx(table, foo, 0, NULL, 0);
ok(hfoo != -1, "Failed to add foo to String Table\n");
ok(hfoo != hstring, "foo and string share the same ID %x in String Table\n", hfoo);
ok(hfoo != hstring, "foo and string share the same ID %lx in String Table\n", hfoo);
/* case sensitive */
hString = pStringTableAddStringEx(table, String, ST_CASE_SENSITIVE_COMPARE, NULL, 0);
ok(hstring != hString, "String handle and string share same ID %x in Table\n", hstring);
ok(hstring != hString, "String handle and string share same ID %lx in Table\n", hstring);
pStringTableDestroy(table);
......@@ -133,19 +133,19 @@ static void test_StringTableAddStringEx(void)
extra = 10;
hstring = pStringTableAddStringEx(table, string, 0, &extra, 4);
ok(hstring != -1, "failed to add string, %d\n", hstring);
ok(hstring != -1, "failed to add string, %ld\n", hstring);
extra = 0;
ret = pStringTableGetExtraData(table, hstring, &extra, 4);
ok(ret && extra == 10, "got %d, extra %d\n", ret, extra);
ok(ret && extra == 10, "got %d, extra %ld\n", ret, extra);
extra = 11;
hstring = pStringTableAddStringEx(table, string, 0, &extra, 4);
ok(hstring != -1, "failed to add string, %d\n", hstring);
ok(hstring != -1, "failed to add string, %ld\n", hstring);
extra = 0;
ret = pStringTableGetExtraData(table, hstring, &extra, 4);
ok(ret && extra == 10, "got %d, extra %d\n", ret, extra);
ok(ret && extra == 10, "got %d, extra %ld\n", ret, extra);
pStringTableDestroy(table);
}
......@@ -188,7 +188,7 @@ static void test_StringTableLookUpString(void)
retval=pStringTableLookUpString(table,string,0);
ok(retval!=-1,"Failed find string in String Table 1\n");
ok(retval==hstring,
"Lookup for string (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for string (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hstring);
retval=pStringTableLookUpString(table2,string,0);
......@@ -203,7 +203,7 @@ static void test_StringTableLookUpString(void)
retval=pStringTableLookUpString(table,foo,0);
ok(retval!=-1,"Failed find foo in String Table 1\n");
ok(retval==hfoo,
"Lookup for foo (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for foo (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hfoo);
retval=pStringTableLookUpString(table2,foo,0);
......@@ -214,7 +214,7 @@ static void test_StringTableLookUpString(void)
retval2=pStringTableLookUpString(table,String,ST_CASE_SENSITIVE_COMPARE);
ok(retval!=retval2,"Lookup of string equals String in Table 1\n");
ok(retval==hString,
"Lookup for String (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for String (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hString);
pStringTableDestroy(table);
......@@ -247,7 +247,7 @@ static void test_StringTableLookUpStringEx(void)
retval = pStringTableLookUpStringEx(table, string, 0, NULL, 0);
ok(retval != ~0u, "Failed find string in String Table 1\n");
ok(retval == hstring,
"Lookup for string (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for string (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hstring);
retval = pStringTableLookUpStringEx(table2, string, 0, NULL, 0);
......@@ -262,7 +262,7 @@ static void test_StringTableLookUpStringEx(void)
retval=pStringTableLookUpStringEx(table, foo, 0, NULL, 0);
ok(retval != ~0u, "Failed find foo in String Table 1\n");
ok(retval == hfoo,
"Lookup for foo (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for foo (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hfoo);
retval = pStringTableLookUpStringEx(table2, foo, 0, NULL, 0);
......@@ -273,7 +273,7 @@ static void test_StringTableLookUpStringEx(void)
retval2 = pStringTableLookUpStringEx(table, String, ST_CASE_SENSITIVE_COMPARE, NULL, 0);
ok(retval != retval2, "Lookup of string equals String in Table 1\n");
ok(retval == hString,
"Lookup for String (%x) does not match previous handle (%x) in String Table 1\n",
"Lookup for String (%lx) does not match previous handle (%lx) in String Table 1\n",
retval, hString);
pStringTableDestroy(table);
......@@ -318,10 +318,10 @@ static void test_StringTableStringFromId(void)
/* correct */
id2 = pStringTableLookUpString(table, string, 0);
ok(id2 == id, "got %d and %d\n", id2, id);
ok(id2 == id, "got %ld and %ld\n", id2, id);
string2 = pStringTableStringFromId(table, id2);
ok(string2 != NULL, "failed to lookup string %d\n", id2);
ok(string2 != NULL, "failed to lookup string %ld\n", id2);
ok(!lstrcmpiW(string, string2), "got %s, expected %s\n", wine_dbgstr_w(string2), wine_dbgstr_w(string));
pStringTableDestroy(table);
......@@ -347,14 +347,14 @@ static void test_stringtable_layout(void)
ptr = (struct stringtable*)table;
ok(ptr->data != NULL, "got %p\n", ptr->data);
/* first data offset is right after bucket area */
ok(ptr->nextoffset == 509*sizeof(DWORD), "got %d\n", ptr->nextoffset);
ok(ptr->allocated != 0, "got %d\n", ptr->allocated);
ok(ptr->nextoffset == 509*sizeof(DWORD), "got %ld\n", ptr->nextoffset);
ok(ptr->allocated != 0, "got %ld\n", ptr->allocated);
todo_wine {
ok(ptr->unk[0] != 0, "got %lx\n", ptr->unk[0]);
ok(ptr->unk[1] != 0, "got %lx\n", ptr->unk[1]);
ok(ptr->unk[0] != 0, "got %Ix\n", ptr->unk[0]);
ok(ptr->unk[1] != 0, "got %Ix\n", ptr->unk[1]);
}
ok(ptr->max_extra_size == 0, "got %d\n", ptr->max_extra_size);
ok(ptr->lcid == GetThreadLocale(), "got %x, thread lcid %x\n", ptr->lcid, GetThreadLocale());
ok(ptr->max_extra_size == 0, "got %ld\n", ptr->max_extra_size);
ok(ptr->lcid == GetThreadLocale(), "got %lx, thread lcid %lx\n", ptr->lcid, GetThreadLocale());
pStringTableDestroy(table);
}
......
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