Module: wine Branch: master Commit: dce0d05e83d8f27e46da1bf6f77a1da5f77c4659 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=dce0d05e83d8f27e46da1bf6...
Author: Paul Vriens Paul.Vriens@xs4all.nl Date: Tue Aug 29 17:57:35 2006 +0200
wintrust: Add some extra tests for WintrustRemoveActionID.
---
dlls/wintrust/tests/register.c | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/dlls/wintrust/tests/register.c b/dlls/wintrust/tests/register.c index f41b21d..78f2214 100644 --- a/dlls/wintrust/tests/register.c +++ b/dlls/wintrust/tests/register.c @@ -130,7 +130,7 @@ static void test_AddRem_ActionID(void) todo_wine { ok (ret, "Expected WintrustAddActionID to succeed.\n"); - ok (GetLastError() == ERROR_INVALID_PARAMETER /* W2K */, + ok (GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld.\n", GetLastError()); }
@@ -152,7 +152,7 @@ static void test_AddRem_ActionID(void) todo_wine { ok (ret, "Expected WintrustAddActionID to succeed.\n"); - ok (GetLastError() == 0xdeadbeef /* W2K */, + ok (GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld.\n", GetLastError()); }
@@ -163,6 +163,26 @@ static void test_AddRem_ActionID(void) ok ( ret, "WintrustRemoveActionID failed : 0x%08lx\n", GetLastError()); ok ( GetLastError() == 0xdeadbeef, "Last error should not have been changed: 0x%08lx\n", GetLastError()); } + + /* NULL input */ + SetLastError(0xdeadbeef); + ret = pWintrustRemoveActionID(NULL); + todo_wine + { + ok (ret, "Expected WintrustRemoveActionID to succeed.\n"); + ok (GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %ld.\n", GetLastError()); + } + + /* The passed GUID is removed by a previous call, so it's basically a test with a non-existent Trust provider */ + SetLastError(0xdeadbeef); + ret = pWintrustRemoveActionID(&ActionID); + todo_wine + { + ok (ret, "Expected WintrustRemoveActionID to succeed.\n"); + ok (GetLastError() == 0xdeadbeef, + "Expected 0xdeadbeef, got %ld.\n", GetLastError()); + } }
START_TEST(register)