Commit 7eab62d3 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

qmgr/tests: Enable compilation with long types.

parent 9c02d53c
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = qmgr.dll
IMPORTS = uuid ole32 shlwapi user32
......
......@@ -135,7 +135,7 @@ static void test_GetCount(void)
ULONG fileCount;
hres = IEnumBackgroundCopyFiles_GetCount(test_enumFiles, &fileCount);
ok(hres == S_OK, "GetCount failed: %08x\n", hres);
ok(hres == S_OK, "GetCount failed: %08lx\n", hres);
ok(fileCount == test_fileCount, "Got incorrect count\n");
}
......@@ -150,13 +150,13 @@ static void test_Next_walkListNull(void)
for (i = 0; i < test_fileCount; i++)
{
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, NULL);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
IBackgroundCopyFile_Release(file);
}
/* Attempt to fetch one more than the number of available files */
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, NULL);
ok(hres == S_FALSE, "Next off end of available files failed: %08x\n", hres);
ok(hres == S_FALSE, "Next off end of available files failed: %08lx\n", hres);
}
/* Test Next by requesting one file at a time */
......@@ -173,8 +173,8 @@ static void test_Next_walkList_1(void)
file = NULL;
fetched = 0;
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, &fetched);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(fetched == 1, "Next returned the incorrect number of files: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
ok(fetched == 1, "Next returned the incorrect number of files: %08lx\n", hres);
ok(file != NULL, "Next returned NULL\n");
if (file)
IBackgroundCopyFile_Release(file);
......@@ -183,8 +183,8 @@ static void test_Next_walkList_1(void)
/* Attempt to fetch one more than the number of available files */
fetched = 0;
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, &fetched);
ok(hres == S_FALSE, "Next off end of available files failed: %08x\n", hres);
ok(fetched == 0, "Next returned the incorrect number of files: %08x\n", hres);
ok(hres == S_FALSE, "Next off end of available files failed: %08lx\n", hres);
ok(fetched == 0, "Next returned the incorrect number of files: %08lx\n", hres);
}
/* Test Next by requesting multiple files at a time */
......@@ -200,8 +200,8 @@ static void test_Next_walkList_2(void)
fetched = 0;
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, test_fileCount, files, &fetched);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(fetched == test_fileCount, "Next returned the incorrect number of files: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
ok(fetched == test_fileCount, "Next returned the incorrect number of files: %08lx\n", hres);
for (i = 0; i < test_fileCount; i++)
{
......@@ -219,7 +219,7 @@ static void test_Next_errors(void)
/* E_INVALIDARG: pceltFetched can ONLY be NULL if celt is 1 */
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 2, files, NULL);
ok(hres == E_INVALIDARG, "Invalid call to Next succeeded: %08x\n", hres);
ok(hres == E_INVALIDARG, "Invalid call to Next succeeded: %08lx\n", hres);
}
/* Test skipping through the files in a list */
......@@ -231,11 +231,11 @@ static void test_Skip_walkList(void)
for (i = 0; i < test_fileCount; i++)
{
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, 1);
ok(hres == S_OK, "Skip failed: %08x\n", hres);
ok(hres == S_OK, "Skip failed: %08lx\n", hres);
}
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, 1);
ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres);
ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres);
}
/* Test skipping off the end of the list */
......@@ -244,7 +244,7 @@ static void test_Skip_offEnd(void)
HRESULT hres;
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount + 1);
ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres);
ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres);
}
/* Test resetting the file enumerator */
......@@ -253,11 +253,11 @@ static void test_Reset(void)
HRESULT hres;
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount);
ok(hres == S_OK, "Skip failed: %08x\n", hres);
ok(hres == S_OK, "Skip failed: %08lx\n", hres);
hres = IEnumBackgroundCopyFiles_Reset(test_enumFiles);
ok(hres == S_OK, "Reset failed: %08x\n", hres);
ok(hres == S_OK, "Reset failed: %08lx\n", hres);
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount);
ok(hres == S_OK, "Reset failed: %08x\n", hres);
ok(hres == S_OK, "Reset failed: %08lx\n", hres);
}
typedef void (*test_t)(void);
......
......@@ -108,10 +108,10 @@ static void test_GetCount(void)
ULONG jobCountA, jobCountB;
hres = IEnumBackgroundCopyJobs_GetCount(test_enumJobsA, &jobCountA);
ok(hres == S_OK, "GetCount failed: %08x\n", hres);
ok(hres == S_OK, "GetCount failed: %08lx\n", hres);
hres = IEnumBackgroundCopyJobs_GetCount(test_enumJobsB, &jobCountB);
ok(hres == S_OK, "GetCount failed: %08x\n", hres);
ok(hres == S_OK, "GetCount failed: %08lx\n", hres);
ok(jobCountB == jobCountA + 1, "Got incorrect count\n");
}
......@@ -127,13 +127,13 @@ static void test_Next_walkListNull(void)
for (i = 0; i < test_jobCountB; i++)
{
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, NULL);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
IBackgroundCopyJob_Release(job);
}
/* Attempt to fetch one more than the number of available jobs */
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, NULL);
ok(hres == S_FALSE, "Next off end of available jobs failed: %08x\n", hres);
ok(hres == S_FALSE, "Next off end of available jobs failed: %08lx\n", hres);
}
/* Test Next */
......@@ -149,16 +149,16 @@ static void test_Next_walkList_1(void)
{
fetched = 0;
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, &fetched);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(fetched == 1, "Next returned the incorrect number of jobs: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
ok(fetched == 1, "Next returned the incorrect number of jobs: %08lx\n", hres);
IBackgroundCopyJob_Release(job);
}
/* Attempt to fetch one more than the number of available jobs */
fetched = 0;
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, &fetched);
ok(hres == S_FALSE, "Next off end of available jobs failed: %08x\n", hres);
ok(fetched == 0, "Next returned the incorrect number of jobs: %08x\n", hres);
ok(hres == S_FALSE, "Next off end of available jobs failed: %08lx\n", hres);
ok(fetched == 0, "Next returned the incorrect number of jobs: %08lx\n", hres);
}
/* Test Next by requesting multiple files at a time */
......@@ -175,8 +175,8 @@ static void test_Next_walkList_2(void)
fetched = 0;
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, test_jobCountB, jobs, &fetched);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(fetched == test_jobCountB, "Next returned the incorrect number of jobs: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
ok(fetched == test_jobCountB, "Next returned the incorrect number of jobs: %08lx\n", hres);
for (i = 0; i < test_jobCountB; i++)
{
......@@ -196,7 +196,7 @@ static void test_Next_errors(void)
/* E_INVALIDARG: pceltFetched can ONLY be NULL if celt is 1 */
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 2, jobs, NULL);
ok(hres != S_OK, "Invalid call to Next succeeded: %08x\n", hres);
ok(hres != S_OK, "Invalid call to Next succeeded: %08lx\n", hres);
}
/* Test skipping through the jobs in a list */
......@@ -208,11 +208,11 @@ static void test_Skip_walkList(void)
for (i = 0; i < test_jobCountB; i++)
{
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, 1);
ok(hres == S_OK, "Skip failed: %08x\n", hres);
ok(hres == S_OK, "Skip failed: %08lx\n", hres);
}
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, 1);
ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres);
ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres);
}
/* Test skipping off the end of the list */
......@@ -221,7 +221,7 @@ static void test_Skip_offEnd(void)
HRESULT hres;
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB + 1);
ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres);
ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres);
}
/* Test reset */
......@@ -230,13 +230,13 @@ static void test_Reset(void)
HRESULT hres;
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB);
ok(hres == S_OK, "Skip failed: %08x\n", hres);
ok(hres == S_OK, "Skip failed: %08lx\n", hres);
hres = IEnumBackgroundCopyJobs_Reset(test_enumJobsB);
ok(hres == S_OK, "Reset failed: %08x\n", hres);
ok(hres == S_OK, "Reset failed: %08lx\n", hres);
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB);
ok(hres == S_OK, "Reset failed: %08x\n", hres);
ok(hres == S_OK, "Reset failed: %08lx\n", hres);
}
typedef void (*test_t)(void);
......
......@@ -147,7 +147,7 @@ static void test_GetRemoteName(void)
LPWSTR name;
hres = IBackgroundCopyFile_GetRemoteName(test_file, &name);
ok(hres == S_OK, "GetRemoteName failed: %08x\n", hres);
ok(hres == S_OK, "GetRemoteName failed: %08lx\n", hres);
ok(lstrcmpW(name, test_remoteUrl) == 0, "Got incorrect remote name\n");
CoTaskMemFree(name);
}
......@@ -159,7 +159,7 @@ static void test_GetLocalName(void)
LPWSTR name;
hres = IBackgroundCopyFile_GetLocalName(test_file, &name);
ok(hres == S_OK, "GetLocalName failed: %08x\n", hres);
ok(hres == S_OK, "GetLocalName failed: %08lx\n", hres);
ok(lstrcmpW(name, test_localFile) == 0, "Got incorrect local name\n");
CoTaskMemFree(name);
}
......@@ -171,7 +171,7 @@ static void test_GetProgress_PreTransfer(void)
BG_FILE_PROGRESS progress;
hres = IBackgroundCopyFile_GetProgress(test_file, &progress);
ok(hres == S_OK, "GetProgress failed: %08x\n", hres);
ok(hres == S_OK, "GetProgress failed: %08lx\n", hres);
ok(progress.BytesTotal == BG_SIZE_UNKNOWN, "Got incorrect total size: %s\n",
wine_dbgstr_longlong(progress.BytesTotal));
ok(progress.BytesTransferred == 0, "Got incorrect number of transferred bytes: %s\n",
......
......@@ -60,14 +60,14 @@ static void test_CreateJob(void)
hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL,
CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager,
(void **) &manager);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
/* Create bits job */
hres = IBackgroundCopyManager_CreateJob(manager, L"Test", BG_JOB_TYPE_DOWNLOAD, &tmpId, &job);
ok(hres == S_OK, "CreateJob failed: %08x\n", hres);
ok(hres == S_OK, "CreateJob failed: %08lx\n", hres);
res = IBackgroundCopyJob_Release(job);
ok(res == 0, "Bad ref count on release: %u\n", res);
ok(res == 0, "Bad ref count on release: %lu\n", res);
IBackgroundCopyManager_Release(manager);
}
......@@ -84,13 +84,13 @@ static void test_EnumJobs(void)
hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL,
CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager,
(void **) &manager);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyManager_CreateJob(manager, L"Test", BG_JOB_TYPE_DOWNLOAD, &tmpId, &job);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyManager_EnumJobs(manager, 0, &enumJobs);
ok(hres == S_OK, "EnumJobs failed: %08x\n", hres);
ok(hres == S_OK, "EnumJobs failed: %08lx\n", hres);
IEnumBackgroundCopyJobs_Release(enumJobs);
/* Tear down */
......@@ -124,7 +124,7 @@ static void do_child(const char *secretA)
hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL,
CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager,
(void **) &manager);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
MultiByteToWideChar(CP_ACP, 0, secretA, -1, secretW, MAX_PATH);
hres = IBackgroundCopyManager_CreateJob(manager, secretW,
......@@ -143,13 +143,13 @@ static void test_globalness(void)
hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL,
CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager,
(void **) &manager);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
wsprintfW(secretName, L"test_%u", GetTickCount());
run_child(secretName);
hres = IBackgroundCopyManager_EnumJobs(manager, 0, &enumJobs);
ok(hres == S_OK, "EnumJobs failed: %08x\n", hres);
ok(hres == S_OK, "EnumJobs failed: %08lx\n", hres);
if(hres != S_OK)
skip("Unable to create job enumerator.\n");
else
......@@ -159,7 +159,7 @@ static void test_globalness(void)
BOOL found = FALSE;
hres = IEnumBackgroundCopyJobs_GetCount(enumJobs, &n);
ok(hres == S_OK, "GetCount failed: %08x\n", hres);
ok(hres == S_OK, "GetCount failed: %08lx\n", hres);
for (i = 0; i < n && !found; ++i)
{
LPWSTR name;
......
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