mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 18:50:07 +00:00
prntvpt/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4705f8fe94
commit
2a64ee2aac
|
@ -1,4 +1,3 @@
|
||||||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
|
||||||
TESTDLL = prntvpt.dll
|
TESTDLL = prntvpt.dll
|
||||||
IMPORTS = prntvpt winspool ole32
|
IMPORTS = prntvpt winspool ole32
|
||||||
|
|
||||||
|
|
|
@ -55,27 +55,27 @@ static void test_PTOpenProvider(void)
|
||||||
struct hprov_data data;
|
struct hprov_data data;
|
||||||
|
|
||||||
hr = PTOpenProvider(default_name, 1, &hprov);
|
hr = PTOpenProvider(default_name, 1, &hprov);
|
||||||
ok(hr == S_OK, "got %#x\n", hr);
|
ok(hr == S_OK, "got %#lx\n", hr);
|
||||||
|
|
||||||
data.hprov = hprov;
|
data.hprov = hprov;
|
||||||
hthread = CreateThread(NULL, 0, CloseProvider_proc, &data, 0, &tid);
|
hthread = CreateThread(NULL, 0, CloseProvider_proc, &data, 0, &tid);
|
||||||
WaitForSingleObject(hthread, INFINITE);
|
WaitForSingleObject(hthread, INFINITE);
|
||||||
CloseHandle(hthread);
|
CloseHandle(hthread);
|
||||||
ok(data.hr == E_HANDLE || data.hr == E_INVALIDARG /* XP */ || broken(data.hr == S_OK) /* Win8 */, "got %#x\n", data.hr);
|
ok(data.hr == E_HANDLE || data.hr == E_INVALIDARG /* XP */ || broken(data.hr == S_OK) /* Win8 */, "got %#lx\n", data.hr);
|
||||||
|
|
||||||
if (data.hr != S_OK)
|
if (data.hr != S_OK)
|
||||||
{
|
{
|
||||||
hr = PTCloseProvider(hprov);
|
hr = PTCloseProvider(hprov);
|
||||||
ok(hr == S_OK, "got %#x\n", hr);
|
ok(hr == S_OK, "got %#lx\n", hr);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = PTOpenProvider(default_name, 0, &hprov);
|
hr = PTOpenProvider(default_name, 0, &hprov);
|
||||||
ok(hr == E_INVALIDARG, "got %#x\n", hr);
|
ok(hr == E_INVALIDARG, "got %#lx\n", hr);
|
||||||
|
|
||||||
for (i = 2; i < 20; i++)
|
for (i = 2; i < 20; i++)
|
||||||
{
|
{
|
||||||
hr = PTOpenProvider(default_name, i, &hprov);
|
hr = PTOpenProvider(default_name, i, &hprov);
|
||||||
ok(hr == 0x80040001 || hr == E_INVALIDARG /* Wine */, "%u: got %#x\n", i, hr);
|
ok(hr == 0x80040001 || hr == E_INVALIDARG /* Wine */, "%lu: got %#lx\n", i, hr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,40 +88,40 @@ static void test_PTOpenProviderEx(void)
|
||||||
struct hprov_data data;
|
struct hprov_data data;
|
||||||
|
|
||||||
hr = PTOpenProviderEx(default_name, 1, 1, &hprov, NULL);
|
hr = PTOpenProviderEx(default_name, 1, 1, &hprov, NULL);
|
||||||
ok(hr == E_INVALIDARG, "got %#x\n", hr);
|
ok(hr == E_INVALIDARG, "got %#lx\n", hr);
|
||||||
|
|
||||||
ver = 0xdeadbeef;
|
ver = 0xdeadbeef;
|
||||||
hr = PTOpenProviderEx(default_name, 1, 1, &hprov, &ver);
|
hr = PTOpenProviderEx(default_name, 1, 1, &hprov, &ver);
|
||||||
ok(hr == S_OK, "got %#x\n", hr);
|
ok(hr == S_OK, "got %#lx\n", hr);
|
||||||
ok(ver == 1, "got %#x\n", ver);
|
ok(ver == 1, "got %#lx\n", ver);
|
||||||
|
|
||||||
data.hprov = hprov;
|
data.hprov = hprov;
|
||||||
hthread = CreateThread(NULL, 0, CloseProvider_proc, &data, 0, &tid);
|
hthread = CreateThread(NULL, 0, CloseProvider_proc, &data, 0, &tid);
|
||||||
WaitForSingleObject(hthread, INFINITE);
|
WaitForSingleObject(hthread, INFINITE);
|
||||||
CloseHandle(hthread);
|
CloseHandle(hthread);
|
||||||
ok(data.hr == E_HANDLE || data.hr == E_INVALIDARG /* XP */ || broken(data.hr == S_OK) /* Win8 */, "got %#x\n", data.hr);
|
ok(data.hr == E_HANDLE || data.hr == E_INVALIDARG /* XP */ || broken(data.hr == S_OK) /* Win8 */, "got %#lx\n", data.hr);
|
||||||
|
|
||||||
if (data.hr != S_OK)
|
if (data.hr != S_OK)
|
||||||
{
|
{
|
||||||
hr = PTCloseProvider(hprov);
|
hr = PTCloseProvider(hprov);
|
||||||
ok(hr == S_OK, "got %#x\n", hr);
|
ok(hr == S_OK, "got %#lx\n", hr);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i < 20; i++)
|
for (i = 1; i < 20; i++)
|
||||||
{
|
{
|
||||||
hr = PTOpenProviderEx(default_name, 0, i, &hprov, &ver);
|
hr = PTOpenProviderEx(default_name, 0, i, &hprov, &ver);
|
||||||
ok(hr == E_INVALIDARG, "%u: got %#x\n", i, hr);
|
ok(hr == E_INVALIDARG, "%lu: got %#lx\n", i, hr);
|
||||||
|
|
||||||
ver = 0xdeadbeef;
|
ver = 0xdeadbeef;
|
||||||
hr = PTOpenProviderEx(default_name, 1, i, &hprov, &ver);
|
hr = PTOpenProviderEx(default_name, 1, i, &hprov, &ver);
|
||||||
ok(hr == S_OK, "%u: got %#x\n", i, hr);
|
ok(hr == S_OK, "%lu: got %#lx\n", i, hr);
|
||||||
ok(ver == 1, "%u: got %#x\n", i, ver);
|
ok(ver == 1, "%lu: got %#lx\n", i, ver);
|
||||||
PTCloseProvider(hprov);
|
PTCloseProvider(hprov);
|
||||||
|
|
||||||
ver = 0xdeadbeef;
|
ver = 0xdeadbeef;
|
||||||
hr = PTOpenProviderEx(default_name, i, i, &hprov, &ver);
|
hr = PTOpenProviderEx(default_name, i, i, &hprov, &ver);
|
||||||
ok(hr == S_OK, "%u: got %#x\n", i, hr);
|
ok(hr == S_OK, "%lu: got %#lx\n", i, hr);
|
||||||
ok(ver == 1, "%u: got %#x\n", i, ver);
|
ok(ver == 1, "%lu: got %#lx\n", i, ver);
|
||||||
PTCloseProvider(hprov);
|
PTCloseProvider(hprov);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue