user32/tests: Fix a test that assumes that a menu handle is invalid.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2015-11-19 20:03:20 +09:00
parent 8454e23529
commit 8693805431
1 changed files with 2 additions and 0 deletions

View File

@ -3789,6 +3789,8 @@ static void test_AppendMenu(void)
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_SUBMENU;
mii.hSubMenu = (HMENU)204;
/* make sure the menu handle is truly invalid */
while (IsMenu( mii.hSubMenu )) mii.hSubMenu = (HMENU)((ULONG_PTR)mii.hSubMenu + 1);
ret = InsertMenuItemA(hmenu, 0, TRUE, &mii);
ok(!ret, "InsertMenuItem should fail\n");
ret = SetMenuItemInfoA(hmenu, 0, TRUE, &mii);