Module: wine
Branch: refs/heads/master
Commit: 0049e563cc01b378b8b4f79ee173bcfe106a19dd
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=0049e563cc01b378b8b4f79…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com>
Date: Tue Aug 1 23:05:42 2006 +0900
user: Add a couple of missing bits to the SetWindowLong test.
---
dlls/user/tests/win.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/user/tests/win.c b/dlls/user/tests/win.c
index 35cd7fc..a1c7539 100644
--- a/dlls/user/tests/win.c
+++ b/dlls/user/tests/win.c
@@ -3831,6 +3831,7 @@ static int check_error(DWORD actual, DWO
static void test_SetWindowLong(void)
{
LONG_PTR retval;
+ WNDPROC old_window_procW;
SetLastError(0xdeadbeef);
retval = SetWindowLongPtr(NULL, GWLP_WNDPROC, 0);
@@ -3854,11 +3855,15 @@ static void test_SetWindowLong(void)
"SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%x\n", retval);
ok(!IsWindowUnicode(hwndMain), "hwndMain shouldn't be Unicode\n");
+ old_window_procW = (WNDPROC)GetWindowLongPtrW(hwndMain, GWLP_WNDPROC);
SetLastError(0xdeadbeef);
retval = SetWindowLongPtrW(hwndMain, GWLP_WNDPROC, 0);
if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
{
ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %ld\n", GetLastError());
+ ok(retval != 0, "SetWindowLongPtr error %ld\n", GetLastError());
+ ok((WNDPROC)retval == old_window_procW,
+ "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%x\n", retval);
ok(IsWindowUnicode(hwndMain), "hwndMain should now be Unicode\n");
/* set it back to ANSI */