rasapi32/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
65f36a9695
commit
8c5a301deb
|
@ -1,4 +1,3 @@
|
|||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
||||
TESTDLL = rasapi32.dll
|
||||
|
||||
C_SRCS = \
|
||||
|
|
|
@ -64,9 +64,9 @@ static void test_rasenum(void)
|
|||
win_skip("RasEnumDevicesA found nothing to enumerate\n");
|
||||
return;
|
||||
}
|
||||
trace("RasEnumDevicesA: returned %d buffersize %d\n", result, bufsize);
|
||||
trace("RasEnumDevicesA: returned %ld buffersize %ld\n", result, bufsize);
|
||||
ok(result == ERROR_BUFFER_TOO_SMALL,
|
||||
"Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result);
|
||||
"Expected ERROR_BUFFER_TOO_SMALL, got %08ld\n", result);
|
||||
|
||||
rasDevInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
max(bufsize,sizeof(RASDEVINFOA)));
|
||||
|
@ -79,99 +79,99 @@ static void test_rasenum(void)
|
|||
cb = bufsize;
|
||||
cDevices = 0xdeadbeef;
|
||||
result = pRasEnumDevicesA(NULL, &cb, &cDevices);
|
||||
ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %u\n", cDevices);
|
||||
ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %lu\n", cDevices);
|
||||
ok(result == ERROR_BUFFER_TOO_SMALL ||
|
||||
result == ERROR_INVALID_USER_BUFFER, /* win98 */
|
||||
"Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result);
|
||||
"Expected ERROR_BUFFER_TOO_SMALL, got %08ld\n", result);
|
||||
|
||||
rasDevInfo[0].dwSize = 0;
|
||||
cb = bufsize;
|
||||
cDevices = 0xdeadbeef;
|
||||
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices);
|
||||
ok(result == ERROR_INVALID_SIZE ||
|
||||
result == ERROR_INVALID_USER_BUFFER, /* win98 */
|
||||
"Expected ERROR_INVALID_SIZE, got %08d\n", result);
|
||||
"Expected ERROR_INVALID_SIZE, got %08ld\n", result);
|
||||
|
||||
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA) -1;
|
||||
cb = bufsize;
|
||||
cDevices = 0xdeadbeef;
|
||||
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices);
|
||||
ok(result == ERROR_INVALID_SIZE ||
|
||||
result == ERROR_INVALID_USER_BUFFER, /* win98 */
|
||||
"Expected ERROR_INVALID_SIZE, got %08d\n", result);
|
||||
"Expected ERROR_INVALID_SIZE, got %08ld\n", result);
|
||||
|
||||
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA) +1;
|
||||
cb = bufsize;
|
||||
cDevices = 0xdeadbeef;
|
||||
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices);
|
||||
ok(result == ERROR_INVALID_SIZE ||
|
||||
result == ERROR_INVALID_USER_BUFFER, /* win98 */
|
||||
"Expected ERROR_INVALID_SIZE, got %08d\n", result);
|
||||
"Expected ERROR_INVALID_SIZE, got %08ld\n", result);
|
||||
|
||||
/* test second parameter */
|
||||
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA);
|
||||
cDevices = 0xdeadbeef;
|
||||
result = pRasEnumDevicesA(rasDevInfo, NULL, &cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices);
|
||||
ok(result == ERROR_INVALID_PARAMETER,
|
||||
"Expected ERROR_INVALID_PARAMETER, got %08d\n", result);
|
||||
"Expected ERROR_INVALID_PARAMETER, got %08ld\n", result);
|
||||
|
||||
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA);
|
||||
cb = 0;
|
||||
cDevices = 0xdeadbeef;
|
||||
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
|
||||
todo_wine
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices);
|
||||
ok(result == ERROR_BUFFER_TOO_SMALL ||
|
||||
result == ERROR_INVALID_SIZE, /* vista, 2k8 */
|
||||
"Expected ERROR_BUFFER_TOO_SMALL/ERROR_INVALID_SIZE, got %08d\n", result);
|
||||
"Expected ERROR_BUFFER_TOO_SMALL/ERROR_INVALID_SIZE, got %08ld\n", result);
|
||||
|
||||
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA);
|
||||
cb = bufsize -1;
|
||||
cDevices = 0xdeadbeef;
|
||||
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
|
||||
ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %u\n", cDevices);
|
||||
ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %lu\n", cDevices);
|
||||
ok(result == ERROR_BUFFER_TOO_SMALL,
|
||||
"Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result);
|
||||
"Expected ERROR_BUFFER_TOO_SMALL, got %08ld\n", result);
|
||||
|
||||
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA);
|
||||
cb = bufsize +1;
|
||||
cDevices = 0xdeadbeef;
|
||||
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
|
||||
ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %u\n", cDevices);
|
||||
ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %lu\n", cDevices);
|
||||
ok(result == ERROR_SUCCESS,
|
||||
"Expected ERROR_SUCCESS, got %08d\n", result);
|
||||
"Expected ERROR_SUCCESS, got %08ld\n", result);
|
||||
|
||||
/* test third parameter */
|
||||
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA);
|
||||
cb = bufsize;
|
||||
result = pRasEnumDevicesA(rasDevInfo, &cb, NULL);
|
||||
ok(result == ERROR_INVALID_PARAMETER,
|
||||
"Expected ERROR_INVALID_PARAMETER, got %08d\n", result);
|
||||
"Expected ERROR_INVALID_PARAMETER, got %08ld\n", result);
|
||||
|
||||
/* test combinations of invalid parameters */
|
||||
cDevices = 0xdeadbeef;
|
||||
result = pRasEnumDevicesA(NULL, NULL, &cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices);
|
||||
ok(result == ERROR_INVALID_PARAMETER,
|
||||
"Expected ERROR_INVALID_PARAMETER, got %08d\n", result);
|
||||
"Expected ERROR_INVALID_PARAMETER, got %08ld\n", result);
|
||||
|
||||
result = pRasEnumDevicesA(NULL, &cb, NULL);
|
||||
ok(result == ERROR_INVALID_PARAMETER ||
|
||||
result == ERROR_INVALID_USER_BUFFER, /* win98 */
|
||||
"Expected ERROR_INVALID_PARAMETER, got %08d\n", result);
|
||||
"Expected ERROR_INVALID_PARAMETER, got %08ld\n", result);
|
||||
|
||||
cb = 0;
|
||||
rasDevInfo[0].dwSize = 0;
|
||||
cDevices = 0xdeadbeef;
|
||||
result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices);
|
||||
ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices);
|
||||
ok(result == ERROR_INVALID_SIZE ||
|
||||
broken(result == ERROR_BUFFER_TOO_SMALL), /* win98 */
|
||||
"Expected ERROR_INVALID_SIZE, got %08d\n", result);
|
||||
"Expected ERROR_INVALID_SIZE, got %08ld\n", result);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, rasDevInfo);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue