From 20f058662247fce9223d852525726dc8ff8d224b Mon Sep 17 00:00:00 2001 From: Andrew Riedi Date: Sun, 9 Dec 2007 23:07:56 -0800 Subject: [PATCH] user32: Test the initial state of the cursor. --- dlls/user32/tests/cursoricon.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index d7d5fa6..e45f38a 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -238,6 +238,24 @@ static void test_CopyImage_Bitmap(int depth) HeapFree(GetProcessHeap(), 0, info); } +static void test_initial_cursor(void) +{ + HCURSOR cursor, cursor2; + DWORD error; + + cursor = GetCursor(); + + /* Check what handle GetCursor() returns if a cursor is not set yet. */ + SetLastError(0xdeadbeef); + cursor2 = LoadCursor(NULL, IDC_WAIT); + todo_wine { + ok(cursor == (HCURSOR) 0x00010015, "Cursor handle is %p, not 0x00010015.\n", cursor); + ok(cursor == cursor2, "cursor (%p) is not IDC_WAIT (%p).\n", cursor, cursor2); + } + error = GetLastError(); + ok(error == 0xdeadbeef, "Last error: 0x%08x\n", error); +} + static void test_icon_info_dbg(HICON hIcon, UINT exp_cx, UINT exp_cy, UINT exp_bpp, int line) { ICONINFO info; @@ -460,6 +478,7 @@ START_TEST(cursoricon) test_CopyImage_Bitmap(16); test_CopyImage_Bitmap(24); test_CopyImage_Bitmap(32); + test_initial_cursor(); test_CreateIcon(); test_DestroyCursor(); } -- 1.4.4.2