Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4f5460ff
Commit
4f5460ff
authored
Nov 07, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Nov 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Skip GetMenuItemInfo tests on NT4 and below.
parent
80d36049
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
6 deletions
+40
-6
menu.c
dlls/user32/tests/menu.c
+40
-6
No files found.
dlls/user32/tests/menu.c
View file @
4f5460ff
...
...
@@ -57,6 +57,33 @@ static void init_function_pointers(void)
#undef GET_PROC
}
static
BOOL
correct_behavior
(
void
)
{
HMENU
hmenu
;
MENUITEMINFO
info
;
BOOL
rc
;
hmenu
=
CreateMenu
();
memset
(
&
info
,
0
,
sizeof
(
MENUITEMINFO
));
info
.
cbSize
=
sizeof
(
MENUITEMINFO
);
SetLastError
(
0xdeadbeef
);
rc
=
GetMenuItemInfo
(
hmenu
,
0
,
TRUE
,
&
info
);
/* Win9x : 0xdeadbeef
* NT4 : ERROR_INVALID_PARAMETER
* >= W2K : ERROR_MENU_ITEM_NOT_FOUND
*/
if
(
!
rc
&&
GetLastError
()
!=
ERROR_MENU_ITEM_NOT_FOUND
)
{
win_skip
(
"NT4 and below can't handle a bigger MENUITEMINFO struct
\n
"
);
DestroyMenu
(
hmenu
);
return
FALSE
;
}
DestroyMenu
(
hmenu
);
return
TRUE
;
}
static
LRESULT
WINAPI
menu_check_wnd_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
switch
(
msg
)
...
...
@@ -2351,13 +2378,23 @@ START_TEST(menu)
{
init_function_pointers
();
/* Wine defines MENUITEMINFO for W2K and above. NT4 and below can't
* handle that.
*/
if
(
correct_behavior
())
{
test_menu_add_string
();
test_menu_iteminfo
();
test_menu_search_bycommand
();
test_CheckMenuRadioItem
();
test_menu_resource_layout
();
test_InsertMenu
();
}
register_menu_check_class
();
test_menu_locked_by_window
();
test_menu_ownerdraw
();
test_menu_add_string
();
test_menu_iteminfo
();
test_menu_search_bycommand
();
test_menu_bmp_and_string
();
if
(
!
pSendInput
)
...
...
@@ -2367,7 +2404,4 @@ START_TEST(menu)
test_menu_flags
();
test_menu_hilitemenuitem
();
test_CheckMenuRadioItem
();
test_menu_resource_layout
();
test_InsertMenu
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment