[PATCH] user32/tests: Remove runtime check for EndMenu()
Nikolay Sivov
nsivov at codeweavers.com
Wed Dec 6 06:23:38 CST 2017
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
It's already used directly in msg.c.
dlls/user32/tests/edit.c | 12 +++---------
dlls/user32/tests/menu.c | 9 ++-------
2 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c
index 9372c484af..79c0010e4e 100644
--- a/dlls/user32/tests/edit.c
+++ b/dlls/user32/tests/edit.c
@@ -38,14 +38,12 @@ struct edit_notify {
static struct edit_notify notifications;
-static BOOL (WINAPI *pEndMenu) (void);
static BOOL (WINAPI *pGetMenuBarInfo)(HWND,LONG,LONG,PMENUBARINFO);
static void init_function_pointers(void)
{
HMODULE hdll = GetModuleHandleA("user32");
- pEndMenu = (void*)GetProcAddress(hdll, "EndMenu");
pGetMenuBarInfo = (void*)GetProcAddress(hdll, "GetMenuBarInfo");
}
@@ -2294,7 +2292,7 @@ static LRESULT CALLBACK edit4_wnd_procA(HWND hWnd, UINT msg, WPARAM wParam, LPAR
if (hWnd != (HWND)lParam)
{
got_wm_capturechanged = TRUE;
- pEndMenu();
+ EndMenu();
}
break;
}
@@ -2337,7 +2335,7 @@ static LRESULT CALLBACK edit_proc_proxy(HWND hWnd, UINT msg, WPARAM wParam, LPAR
ok(!mbi.fFocused, "mbi.fFocused = TRUE\n");
}
- pEndMenu();
+ EndMenu();
break;
}
}
@@ -2985,11 +2983,7 @@ START_TEST(edit)
test_child_edit_wmkeydown();
test_fontsize();
test_dialogmode();
- if (pEndMenu)
- test_contextmenu();
- else
- win_skip("EndMenu is not available\n");
-
+ test_contextmenu();
test_EM_GETHANDLE();
test_paste();
diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c
index 03454fedfd..f99cd946b4 100644
--- a/dlls/user32/tests/menu.c
+++ b/dlls/user32/tests/menu.c
@@ -41,7 +41,6 @@ static BOOL (WINAPI *pGetMenuInfo)(HMENU,LPCMENUINFO);
static BOOL (WINAPI *pGetMenuBarInfo)(HWND,LONG,LONG,PMENUBARINFO);
static UINT (WINAPI *pSendInput)(UINT, INPUT*, size_t);
static BOOL (WINAPI *pSetMenuInfo)(HMENU,LPCMENUINFO);
-static BOOL (WINAPI *pEndMenu) (void);
static void init_function_pointers(void)
{
@@ -56,7 +55,6 @@ static void init_function_pointers(void)
GET_PROC(GetMenuBarInfo)
GET_PROC(SendInput)
GET_PROC(SetMenuInfo)
- GET_PROC(EndMenu)
#undef GET_PROC
}
@@ -3518,7 +3516,7 @@ static LRESULT WINAPI menu_cancelmode_wnd_proc(HWND hwnd, UINT msg,
PostMessageA( hwnd, WM_MOUSEMOVE, 0, 0);
return SendMessageA( g_hwndtosend, WM_CANCELMODE, 0, 0);
}
- pEndMenu();
+ EndMenu();
return TRUE;
}
}
@@ -3531,10 +3529,7 @@ static void test_menu_cancelmode(void)
HWND hwnd, hwndchild;
HMENU menu, menubar;
MSG msg;
- if( !pEndMenu) { /* win95 */
- win_skip( "EndMenu is not available\n");
- return;
- }
+
hwnd = CreateWindowExA( 0, (LPCSTR)MAKEINTATOM(atomMenuCheckClass), NULL,
WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200,
NULL, NULL, NULL, NULL);
--
2.15.0
More information about the wine-devel
mailing list