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

schannel/tests: Enable compilation with long types.

parent 0b3c158c
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = schannel.dll
C_SRCS = \
......
......@@ -77,27 +77,27 @@ static void testInitialize(void)
/* SpLsaModeInitialize does not care about the LSA version. */
status = pSpLsaModeInitialize(0, &Version, &pTables2, &cTables);
ok(status == STATUS_SUCCESS, "status: 0x%x\n", status);
ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status);
ok(cTables == 2 ||
broken(cTables == 1), /* Win2k */
"cTables: %d\n", cTables);
"cTables: %ld\n", cTables);
ok(pTables2 != NULL,"pTables: %p\n", pTables2);
/* We can call it as many times we want. */
status = pSpLsaModeInitialize(0x10000, &Version, &pTables, &cTables);
ok(status == STATUS_SUCCESS, "status: 0x%x\n", status);
ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status);
ok(cTables == 2 ||
broken(cTables == 1), /* Win2k */
"cTables: %d\n", cTables);
"cTables: %ld\n", cTables);
ok(pTables != NULL, "pTables: %p\n", pTables);
/* It will always return the same pointer. */
ok(pTables == pTables2, "pTables: %p, pTables2: %p\n", pTables, pTables2);
status = pSpLsaModeInitialize(0x23456, &Version, &pTables, &cTables);
ok(status == STATUS_SUCCESS, "status: 0x%x\n", status);
ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status);
ok(cTables == 2 ||
broken(cTables == 1), /* Win2k */
"cTables: %d\n", cTables);
"cTables: %ld\n", cTables);
ok(pTables != NULL, "pTables: %p\n", pTables);
ok(pTables == pTables2, "pTables: %p, pTables2: %p\n", pTables, pTables2);
......@@ -106,32 +106,32 @@ static void testInitialize(void)
cUserTables = 0xdead;
pUserTables = NULL;
status = pSpUserModeInitialize(0, &Version, &pUserTables, &cUserTables);
ok(status == STATUS_INVALID_PARAMETER, "status: 0x%x\n", status);
ok(Version == 0xdead, "Version: 0x%x\n", Version);
ok(cUserTables == 0xdead, "cTables: %d\n", cUserTables);
ok(status == STATUS_INVALID_PARAMETER, "status: 0x%lx\n", status);
ok(Version == 0xdead, "Version: 0x%lx\n", Version);
ok(cUserTables == 0xdead, "cTables: %ld\n", cUserTables);
ok(pUserTables == NULL, "pUserTables: %p\n", pUserTables);
status = pSpUserModeInitialize(0x20000, &Version, &pUserTables,
&cUserTables);
ok(status == STATUS_INVALID_PARAMETER, "status: 0x%x\n", status);
ok(Version == 0xdead, "Version: 0x%x\n", Version);
ok(cUserTables == 0xdead, "cTables: %d\n", cUserTables);
ok(status == STATUS_INVALID_PARAMETER, "status: 0x%lx\n", status);
ok(Version == 0xdead, "Version: 0x%lx\n", Version);
ok(cUserTables == 0xdead, "cTables: %ld\n", cUserTables);
ok(pUserTables == NULL, "pUserTables: %p\n", pUserTables);
/* Good version to SpUserModeInitialize */
status = pSpUserModeInitialize(SECPKG_INTERFACE_VERSION, &Version,
&pUserTables, &cUserTables);
ok(status == STATUS_SUCCESS, "status: 0x%x\n", status);
ok(Version == SECPKG_INTERFACE_VERSION, "Version: 0x%x\n", Version);
ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status);
ok(Version == SECPKG_INTERFACE_VERSION, "Version: 0x%lx\n", Version);
ok(cUserTables == 2 ||
broken(cUserTables == 4), /* Win2k */
"cUserTables: %d\n", cUserTables);
"cUserTables: %ld\n", cUserTables);
ok(pUserTables != NULL, "pUserTables: %p\n", pUserTables);
/* Initializing user again */
status = pSpUserModeInitialize(SECPKG_INTERFACE_VERSION, &Version,
&pUserTables2, &cTables);
ok(status == STATUS_SUCCESS, "status: 0x%x\n", status);
ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status);
ok(pUserTables == pUserTables2, "pUserTables: %p, pUserTables2: %p\n",
pUserTables, pUserTables2);
}
......@@ -161,7 +161,7 @@ static PSECPKG_FUNCTION_TABLE getNextSecPkgTable(PSECPKG_FUNCTION_TABLE pTable,
else if (Version == SECPKG_INTERFACE_VERSION_8)
size = SECPKG_FUNCTION_TABLE_SIZE_8;
else {
ok(FALSE, "Unknown package version 0x%x\n", Version);
ok(FALSE, "Unknown package version 0x%lx\n", Version);
return NULL;
}
......@@ -217,21 +217,21 @@ static void testGetInfo(void)
/* Get the dispatch table */
status = pSpLsaModeInitialize(0, &Version, &pTables, &cTables);
ok(status == STATUS_SUCCESS, "status: 0x%x\n", status);
ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status);
/* Passing NULL into ->GetInfo causes a crash. */
/* First package: Unified */
status = pTables->GetInfo(&PackageInfo);
ok(status == STATUS_SUCCESS, "status: 0x%x\n", status);
ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status);
ok(PackageInfo.fCapabilities == LSA_BASE_CAPS ||
PackageInfo.fCapabilities == (LSA_BASE_CAPS|SECPKG_FLAG_APPCONTAINER_PASSTHROUGH),
"fCapabilities: 0x%x\n", PackageInfo.fCapabilities);
"fCapabilities: 0x%lx\n", PackageInfo.fCapabilities);
ok(PackageInfo.wVersion == 1, "wVersion: %d\n", PackageInfo.wVersion);
ok(PackageInfo.wRPCID == 14, "wRPCID: %d\n", PackageInfo.wRPCID);
ok(PackageInfo.cbMaxToken == 0x4000 ||
PackageInfo.cbMaxToken == 0x6000, /* Vista */
"cbMaxToken: 0x%x\n",
"cbMaxToken: 0x%lx\n",
PackageInfo.cbMaxToken);
/* Second package */
......@@ -251,18 +251,18 @@ static void testGetInfo(void)
status = pTables->GetInfo(&PackageInfo);
ok(SUCCEEDED(status) ||
status == SEC_E_UNSUPPORTED_FUNCTION, /* win2k3 */
"status: 0x%x\n", status);
"status: 0x%lx\n", status);
if (SUCCEEDED(status))
{
ok(PackageInfo.fCapabilities == LSA_BASE_CAPS ||
PackageInfo.fCapabilities == (LSA_BASE_CAPS|SECPKG_FLAG_APPCONTAINER_PASSTHROUGH),
"fCapabilities: 0x%x\n", PackageInfo.fCapabilities);
"fCapabilities: 0x%lx\n", PackageInfo.fCapabilities);
ok(PackageInfo.wVersion == 1, "wVersion: %d\n", PackageInfo.wVersion);
ok(PackageInfo.wRPCID == 14, "wRPCID: %d\n", PackageInfo.wRPCID);
ok(PackageInfo.cbMaxToken == 0x4000 ||
PackageInfo.cbMaxToken == 0x6000, /* Win7 */
"cbMaxToken: 0x%x\n",
"cbMaxToken: 0x%lx\n",
PackageInfo.cbMaxToken);
}
}
......
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