James Hawkins : comctl32: Add message ids to allow multi-window test sequences.
Module: wine Branch: master Commit: 2b5f79c9a851961024a2dbffbf2160f698baa6b3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2b5f79c9a851961024a2dbffbf... Author: James Hawkins <truiken(a)gmail.com> Date: Wed Feb 28 18:05:32 2007 +0100 comctl32: Add message ids to allow multi-window test sequences. --- dlls/comctl32/tests/msg.c | 21 +++++++++++++++++++++ dlls/comctl32/tests/msg.h | 4 +++- 2 files changed, 24 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/tests/msg.c b/dlls/comctl32/tests/msg.c index f4dbaef..6d84a76 100644 --- a/dlls/comctl32/tests/msg.c +++ b/dlls/comctl32/tests/msg.c @@ -46,6 +46,7 @@ void add_message(struct msg_sequence **seq, int sequence_index, msg_seq->sequence[msg_seq->count].flags = msg->flags; msg_seq->sequence[msg_seq->count].wParam = msg->wParam; msg_seq->sequence[msg_seq->count].lParam = msg->lParam; + msg_seq->sequence[msg_seq->count].id = msg->id; msg_seq->count++; } @@ -126,6 +127,26 @@ void ok_sequence_(struct msg_sequence **seq, int sequence_index, } } + if (expected->flags & id) + { + if (expected->id != actual->id && todo) + { + todo_wine + { + failcount++; + ok_(file, line) (FALSE, + "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", + context, expected->message, expected->id, actual->id); + } + } + else + { + ok_(file, line) (expected->id == actual->id, + "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", + context, expected->message, expected->id, actual->id); + } + } + if ((expected->flags & defwinproc) != (actual->flags & defwinproc) && todo) { todo_wine diff --git a/dlls/comctl32/tests/msg.h b/dlls/comctl32/tests/msg.h index 2be8d25..2ec3ea1 100644 --- a/dlls/comctl32/tests/msg.h +++ b/dlls/comctl32/tests/msg.h @@ -37,7 +37,8 @@ typedef enum beginpaint = 0x40, optional = 0x80, hook = 0x100, - winevent_hook =0x200 + winevent_hook =0x200, + id = 0x400 } msg_flags_t; struct message @@ -46,6 +47,7 @@ struct message msg_flags_t flags; /* message props */ WPARAM wParam; /* expected value of wParam */ LPARAM lParam; /* expected value of lParam */ + UINT id; /* id of the window */ }; struct msg_sequence
participants (1)
-
Alexandre Julliard