From 5d0783bc0d9149015fcbfd1375f64104d039ff0b Mon Sep 17 00:00:00 2001 From: Austin Lund Date: Wed, 16 Mar 2011 19:59:26 +1000 Subject: [PATCH] user32/tests: Output error information in cursoricon tests. --- dlls/user32/tests/cursoricon.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index 1127f1327e9..d6a437d0a95 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -1452,7 +1452,7 @@ static void test_GetCursorFrameInfo(void) /* Creating a static cursor. */ SetLastError(0xdeadbeef); h1 = CreateIconFromResource((PBYTE) hotspot, CRSR_RES_SIZE, FALSE, 0x00030000); - ok(h1 != NULL, "Create cursor failed.\n"); + ok(h1 != NULL, "Create cursor failed (error = %d).\n", GetLastError()); /* Check GetCursorFrameInfo behavior on a static cursor */ unk1 = unk2 = unk3 = unk4 = 0xdead; @@ -1464,15 +1464,17 @@ static void test_GetCursorFrameInfo(void) ok(unk4 == 1, "GetCursorFrameInfo() unexpected param 5 value (%d != 1).\n", unk4); /* Clean up static cursor. */ + SetLastError(0xdeadbeef); ret = DestroyCursor(h1); - ok(ret, "DestroyCursor() failed.\n"); + ok(ret, "DestroyCursor() failed (error = %d).\n", GetLastError()); /* Creating a single-frame animated cursor. */ empty_anicursor.frames[0].data.icon_info.idType = 2; /* type: cursor */ empty_anicursor.frames[0].data.icon_info.idEntries[0].xHotspot = 3; empty_anicursor.frames[0].data.icon_info.idEntries[0].yHotspot = 3; + SetLastError(0xdeadbeef); h1 = CreateIconFromResource((PBYTE) &empty_anicursor, sizeof(empty_anicursor), FALSE, 0x00030000); - ok(h1 != NULL, "Create cursor failed.\n"); + ok(h1 != NULL, "Create cursor failed (error = %d).\n", GetLastError()); /* Check GetCursorFrameInfo behavior on a single-frame animated cursor */ unk1 = unk2 = unk3 = unk4 = 0xdead; @@ -1485,8 +1487,9 @@ static void test_GetCursorFrameInfo(void) "GetCursorFrameInfo() unexpected param 5 value (%d != 1).\n", unk4); /* Clean up single-frame animated cursor. */ + SetLastError(0xdeadbeef); ret = DestroyCursor(h1); - ok(ret, "DestroyCursor() failed.\n"); + ok(ret, "DestroyCursor() failed (error = %d).\n", GetLastError()); /* Creating a multi-frame animated cursor. */ for (i=0; i