credui/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:
Eric Pouech 2022-02-23 09:11:59 +01:00 committed by Alexandre Julliard
parent 2021c98bad
commit cdc92a7bcb
2 changed files with 18 additions and 19 deletions

View file

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = credui.dll
IMPORTS = credui

View file

@ -50,10 +50,10 @@ static void test_CredUIPromptForCredentials(void)
ret = CredUIConfirmCredentialsW(NULL, TRUE);
ok(ret == ERROR_INVALID_PARAMETER /* 2003 + */ || ret == ERROR_NOT_FOUND /* XP */,
"CredUIConfirmCredentials should have returned ERROR_INVALID_PARAMETER or ERROR_NOT_FOUND instead of %d\n", ret);
"CredUIConfirmCredentials should have returned ERROR_INVALID_PARAMETER or ERROR_NOT_FOUND instead of %ld\n", ret);
ret = CredUIConfirmCredentialsW(wszServerName, TRUE);
ok(ret == ERROR_NOT_FOUND, "CredUIConfirmCredentials should have returned ERROR_NOT_FOUND instead of %d\n", ret);
ok(ret == ERROR_NOT_FOUND, "CredUIConfirmCredentials should have returned ERROR_NOT_FOUND instead of %ld\n", ret);
username[0] = '\0';
password[0] = '\0';
@ -61,19 +61,19 @@ static void test_CredUIPromptForCredentials(void)
ARRAY_SIZE(username),
password, ARRAY_SIZE(password),
NULL, CREDUI_FLAGS_ALWAYS_SHOW_UI);
ok(ret == ERROR_INVALID_FLAGS, "CredUIPromptForCredentials should have returned ERROR_INVALID_FLAGS instead of %d\n", ret);
ok(ret == ERROR_INVALID_FLAGS, "CredUIPromptForCredentials should have returned ERROR_INVALID_FLAGS instead of %ld\n", ret);
ret = CredUIPromptForCredentialsW(NULL, NULL, NULL, 0, username,
ARRAY_SIZE(username),
password, ARRAY_SIZE(password),
NULL, CREDUI_FLAGS_ALWAYS_SHOW_UI | CREDUI_FLAGS_GENERIC_CREDENTIALS);
ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret);
ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %ld\n", ret);
ret = CredUIPromptForCredentialsW(NULL, wszServerName, NULL, 0, username,
ARRAY_SIZE(username),
password, ARRAY_SIZE(password),
NULL, CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX);
ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret);
ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %ld\n", ret);
if (winetest_interactive)
{
@ -81,11 +81,11 @@ static void test_CredUIPromptForCredentials(void)
ARRAY_SIZE(username),
password, ARRAY_SIZE(password),
&save, CREDUI_FLAGS_EXPECT_CONFIRMATION);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %ld\n", ret);
if (ret == ERROR_SUCCESS)
{
ret = CredUIConfirmCredentialsW(wszServerName, FALSE);
ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %d\n", ret);
ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %ld\n", ret);
}
credui_info.pszCaptionText = L"CREDUI_FLAGS_EXPECT_CONFIRMATION";
@ -93,11 +93,11 @@ static void test_CredUIPromptForCredentials(void)
username, ARRAY_SIZE(username),
password, ARRAY_SIZE(password),
&save, CREDUI_FLAGS_EXPECT_CONFIRMATION);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %ld\n", ret);
if (ret == ERROR_SUCCESS)
{
ret = CredUIConfirmCredentialsW(wszServerName, FALSE);
ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %d\n", ret);
ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %ld\n", ret);
}
credui_info.pszCaptionText = L"CREDUI_FLAGS_INCORRECT_PASSWORD|CREDUI_FLAGS_EXPECT_CONFIRMATION";
@ -105,11 +105,11 @@ static void test_CredUIPromptForCredentials(void)
username, ARRAY_SIZE(username),
password, ARRAY_SIZE(password),
NULL, CREDUI_FLAGS_INCORRECT_PASSWORD|CREDUI_FLAGS_EXPECT_CONFIRMATION);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %ld\n", ret);
if (ret == ERROR_SUCCESS)
{
ret = CredUIConfirmCredentialsW(wszServerName, FALSE);
ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %d\n", ret);
ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %ld\n", ret);
}
@ -119,7 +119,7 @@ static void test_CredUIPromptForCredentials(void)
username, ARRAY_SIZE(username),
password, ARRAY_SIZE(password),
&save, CREDUI_FLAGS_DO_NOT_PERSIST|CREDUI_FLAGS_EXPECT_CONFIRMATION);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %ld\n", ret);
ok(save, "save flag should have been untouched\n");
save = FALSE;
@ -128,12 +128,12 @@ static void test_CredUIPromptForCredentials(void)
username, ARRAY_SIZE(username),
password, ARRAY_SIZE(password),
&save, CREDUI_FLAGS_PERSIST|CREDUI_FLAGS_EXPECT_CONFIRMATION);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %ld\n", ret);
ok(!save, "save flag should have been untouched\n");
if (ret == ERROR_SUCCESS)
{
ret = CredUIConfirmCredentialsW(wszServerName, FALSE);
ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %d\n", ret);
ok(ret == ERROR_SUCCESS, "CredUIConfirmCredentials failed with error %ld\n", ret);
}
}
@ -160,17 +160,17 @@ static void test_SspiPromptForCredentials(void)
info.pszCaptionText = L"basic";
info.hbmBanner = NULL;
ret = pSspiPromptForCredentialsW( NULL, &info, 0, L"basic", NULL, &id, &save, 0 );
ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
ok( ret == ERROR_INVALID_PARAMETER, "got %lu\n", ret );
ret = pSspiPromptForCredentialsW( L"SspiTest", &info, 0, NULL, NULL, &id, &save, 0 );
ok( ret == ERROR_NO_SUCH_PACKAGE, "got %u\n", ret );
ok( ret == ERROR_NO_SUCH_PACKAGE, "got %lu\n", ret );
if (winetest_interactive)
{
id = NULL;
save = -1;
ret = pSspiPromptForCredentialsW( L"SspiTest", &info, 0, L"basic", NULL, &id, &save, 0 );
ok( ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "got %u\n", ret );
ok( ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "got %lu\n", ret );
if (ret == ERROR_SUCCESS)
{
ok( id != NULL, "id not set\n" );
@ -179,7 +179,7 @@ static void test_SspiPromptForCredentials(void)
username = creds = NULL;
domain = (const WCHAR *)0xdeadbeef;
status = pSspiEncodeAuthIdentityAsStrings( id, &username, &domain, &creds );
ok( status == SEC_E_OK, "got %u\n", status );
ok( status == SEC_E_OK, "got %lu\n", status );
ok( username != NULL, "username not set\n" );
ok( domain == NULL, "domain not set\n" );
ok( creds != NULL, "creds not set\n" );