https://git.reactos.org/?p=reactos.git;a=commitdiff;h=de793ea5d66cde95583e5…
commit de793ea5d66cde95583e5c666a6d6ef1036bda38
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Dec 9 13:58:55 2017 +0100
[USER32_WINETEST] Add a PCH.
---
modules/rostests/winetests/user32/CMakeLists.txt | 12 ++++++++++--
modules/rostests/winetests/user32/broadcast.c | 13 +------------
modules/rostests/winetests/user32/class.c | 18 +++---------------
modules/rostests/winetests/user32/clipboard.c | 8 +-------
modules/rostests/winetests/user32/combo.c | 9 +--------
modules/rostests/winetests/user32/cursoricon.c | 11 +----------
modules/rostests/winetests/user32/dce.c | 11 +----------
modules/rostests/winetests/user32/dde.c | 16 ++++------------
modules/rostests/winetests/user32/dialog.c | 14 ++------------
modules/rostests/winetests/user32/edit.c | 6 +-----
modules/rostests/winetests/user32/generated.c | 11 +----------
modules/rostests/winetests/user32/input.c | 14 +-------------
modules/rostests/winetests/user32/listbox.c | 12 +-----------
modules/rostests/winetests/user32/menu.c | 16 +---------------
modules/rostests/winetests/user32/monitor.c | 5 +----
modules/rostests/winetests/user32/msg.c | 16 ++--------------
modules/rostests/winetests/user32/precomp.h | 16 ++++++++++++++++
modules/rostests/winetests/user32/resource.c | 5 +----
modules/rostests/winetests/user32/scroll.c | 7 +------
modules/rostests/winetests/user32/static.c | 9 +--------
modules/rostests/winetests/user32/sysparams.c | 20 ++------------------
modules/rostests/winetests/user32/text.c | 9 +--------
modules/rostests/winetests/user32/uitools.c | 6 +-----
modules/rostests/winetests/user32/win.c | 15 +--------------
modules/rostests/winetests/user32/winstation.c | 9 +++------
modules/rostests/winetests/user32/wsprintf.c | 8 +-------
26 files changed, 60 insertions(+), 236 deletions(-)
diff --git a/modules/rostests/winetests/user32/CMakeLists.txt
b/modules/rostests/winetests/user32/CMakeLists.txt
index 041e696023..fc73d16b5f 100644
--- a/modules/rostests/winetests/user32/CMakeLists.txt
+++ b/modules/rostests/winetests/user32/CMakeLists.txt
@@ -1,4 +1,7 @@
+remove_definitions(-DWINVER=0x502 -D_WIN32_WINNT=0x502)
+add_definitions(-DWINVER=0x600 -D_WIN32_WINNT=0x600)
+
list(APPEND SOURCE
broadcast.c
class.c
@@ -24,9 +27,14 @@ list(APPEND SOURCE
win.c
winstation.c
wsprintf.c
- testlist.c)
+ precomp.h)
+
+add_executable(user32_winetest
+ ${SOURCE}
+ testlist.c
+ resource.rc)
-add_executable(user32_winetest ${SOURCE} resource.rc)
+add_pch(user32_winetest precomp.h SOURCE)
# some tests need to be run from an app compiled as GUI
set_module_type(user32_winetest win32gui)
add_importlibs(user32_winetest user32 gdi32 advapi32 msvcrt kernel32)
diff --git a/modules/rostests/winetests/user32/broadcast.c
b/modules/rostests/winetests/user32/broadcast.c
index a18f11a920..d4041500fa 100644
--- a/modules/rostests/winetests/user32/broadcast.c
+++ b/modules/rostests/winetests/user32/broadcast.c
@@ -18,18 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#define _WIN32_WINNT 0x0501
-
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-
-#include "wine/test.h"
+#include "precomp.h"
typedef LONG (WINAPI *PBROADCAST)( DWORD,LPDWORD,UINT,WPARAM,LPARAM );
typedef LONG (WINAPI *PBROADCASTEX)( DWORD,LPDWORD,UINT,WPARAM,LPARAM,PBSMINFO );
diff --git a/modules/rostests/winetests/user32/class.c
b/modules/rostests/winetests/user32/class.c
index 8f316aadab..0d358c2ad9 100755
--- a/modules/rostests/winetests/user32/class.c
+++ b/modules/rostests/winetests/user32/class.c
@@ -18,21 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-/* To get CS_DROPSHADOW with the MSVC headers */
-//#define _WIN32_WINNT 0x0501
-
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winnls.h"
-#include "winreg.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "commctrl.h"
+#include "precomp.h"
+
+#include <commctrl.h>
#define NUMCLASSWORDS 4
diff --git a/modules/rostests/winetests/user32/clipboard.c
b/modules/rostests/winetests/user32/clipboard.c
index 591a47c859..f4aa4a60a3 100755
--- a/modules/rostests/winetests/user32/clipboard.c
+++ b/modules/rostests/winetests/user32/clipboard.c
@@ -18,13 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-#include "wine/test.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
+#include "precomp.h"
#define WM_CLIPBOARDUPDATE 0x031D
diff --git a/modules/rostests/winetests/user32/combo.c
b/modules/rostests/winetests/user32/combo.c
index 7c91f7f5c0..6f42108bb9 100644
--- a/modules/rostests/winetests/user32/combo.c
+++ b/modules/rostests/winetests/user32/combo.c
@@ -17,14 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-
-#define STRICT
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-#include "wine/test.h"
+#include "precomp.h"
#define COMBO_ID 1995
diff --git a/modules/rostests/winetests/user32/cursoricon.c
b/modules/rostests/winetests/user32/cursoricon.c
index 61b32e01b6..11c89c35fe 100644
--- a/modules/rostests/winetests/user32/cursoricon.c
+++ b/modules/rostests/winetests/user32/cursoricon.c
@@ -20,16 +20,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winreg.h"
-#include "wingdi.h"
-#include "winuser.h"
+#include "precomp.h"
#include "pshpack1.h"
diff --git a/modules/rostests/winetests/user32/dce.c
b/modules/rostests/winetests/user32/dce.c
index 382d10a43a..92f320cfd0 100755
--- a/modules/rostests/winetests/user32/dce.c
+++ b/modules/rostests/winetests/user32/dce.c
@@ -18,16 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-
-#include "wine/test.h"
+#include "precomp.h"
#ifndef DCX_USESTYLE
#define DCX_USESTYLE 0x00010000
diff --git a/modules/rostests/winetests/user32/dde.c
b/modules/rostests/winetests/user32/dde.c
index d63a0f65aa..ab76117654 100755
--- a/modules/rostests/winetests/user32/dde.c
+++ b/modules/rostests/winetests/user32/dde.c
@@ -19,18 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winuser.h"
-#include "winnls.h"
-#include "dde.h"
-#include "ddeml.h"
-#include "winerror.h"
-
-#include "wine/test.h"
+#include "precomp.h"
+
+#include <dde.h>
+#include <ddeml.h>
static const WCHAR TEST_DDE_SERVICE[] =
{'T','e','s','t','D','D','E','S','e','r','v','i','c','e',0};
diff --git a/modules/rostests/winetests/user32/dialog.c
b/modules/rostests/winetests/user32/dialog.c
index 882e5a3ed9..f18e626d55 100755
--- a/modules/rostests/winetests/user32/dialog.c
+++ b/modules/rostests/winetests/user32/dialog.c
@@ -28,18 +28,8 @@
* strangeness, especially since most are in situations that would not
* normally be met.
*/
-#undef WINVER
-#define WINVER 0x0600 /* For NONCLIENTMETRICS with padding */
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
+
+#include "precomp.h"
#define MAXHWNDS 1024
static HWND hwnd [MAXHWNDS];
diff --git a/modules/rostests/winetests/user32/edit.c
b/modules/rostests/winetests/user32/edit.c
index b9aa1c9b95..012051cc67 100755
--- a/modules/rostests/winetests/user32/edit.c
+++ b/modules/rostests/winetests/user32/edit.c
@@ -18,11 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <assert.h>
-#include <windows.h>
-#include <commctrl.h>
-
-#include "wine/test.h"
+#include "precomp.h"
#ifndef ES_COMBO
#define ES_COMBO 0x200
diff --git a/modules/rostests/winetests/user32/generated.c
b/modules/rostests/winetests/user32/generated.c
index 174d4dc654..e80277ce1a 100644
--- a/modules/rostests/winetests/user32/generated.c
+++ b/modules/rostests/winetests/user32/generated.c
@@ -5,16 +5,7 @@
* Unit tests for data structure packing
*/
-#undef WINVER
-#define WINVER 0x0600
-//#define _WIN32_IE 0x0501
-//#define _WIN32_WINNT 0x0501
-
-#define WINE_NOWINSOCK
-
-#include "windows.h"
-
-#include "wine/test.h"
+#include "precomp.h"
/***********************************************************************
* Compatibility macros
diff --git a/modules/rostests/winetests/user32/input.c
b/modules/rostests/winetests/user32/input.c
index 807a29adf2..239cc09e9e 100755
--- a/modules/rostests/winetests/user32/input.c
+++ b/modules/rostests/winetests/user32/input.c
@@ -44,19 +44,7 @@
*
*/
-//#define _WIN32_WINNT 0x401
-//#define _WIN32_IE 0x0500
-
-#include <stdarg.h>
-#include <assert.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winuser.h"
-#include "wingdi.h"
-#include "winnls.h"
-
-#include "wine/test.h"
+#include "precomp.h"
/* globals */
static HWND hWndTest;
diff --git a/modules/rostests/winetests/user32/listbox.c
b/modules/rostests/winetests/user32/listbox.c
index 91d4675f83..7033aa65cd 100644
--- a/modules/rostests/winetests/user32/listbox.c
+++ b/modules/rostests/winetests/user32/listbox.c
@@ -17,17 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-
-#include "wine/test.h"
+#include "precomp.h"
#ifdef VISIBLE
#define WAIT Sleep (1000)
diff --git a/modules/rostests/winetests/user32/menu.c
b/modules/rostests/winetests/user32/menu.c
index 4323ae701b..f3aac55609 100755
--- a/modules/rostests/winetests/user32/menu.c
+++ b/modules/rostests/winetests/user32/menu.c
@@ -19,21 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#define _WIN32_WINNT 0x0501
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-#define OEMRESOURCE /* For OBM_MNARROW */
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-
-#include "wine/test.h"
+#include "precomp.h"
static ATOM atomMenuCheckClass;
diff --git a/modules/rostests/winetests/user32/monitor.c
b/modules/rostests/winetests/user32/monitor.c
index 886d63ccfe..313e78ce45 100644
--- a/modules/rostests/winetests/user32/monitor.c
+++ b/modules/rostests/winetests/user32/monitor.c
@@ -19,10 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "wine/test.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
+#include "precomp.h"
static HMODULE hdll;
static LONG (WINAPI *pChangeDisplaySettingsExA)(LPCSTR, LPDEVMODEA, HWND, DWORD,
LPVOID);
diff --git a/modules/rostests/winetests/user32/msg.c
b/modules/rostests/winetests/user32/msg.c
index e0512ffa08..722f8d4efe 100755
--- a/modules/rostests/winetests/user32/msg.c
+++ b/modules/rostests/winetests/user32/msg.c
@@ -20,21 +20,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#define _WIN32_WINNT 0x0600 /* For WM_CHANGEUISTATE,QS_RAWINPUT,WM_DWMxxxx */
-//#define WINVER 0x0600 /* for WM_GETTITLEBARINFOEX */
+#include "precomp.h"
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-#include "dbt.h"
-
-#include "wine/test.h"
+#include <dbt.h>
#define MDI_FIRST_CHILD_ID 2004
diff --git a/modules/rostests/winetests/user32/precomp.h
b/modules/rostests/winetests/user32/precomp.h
new file mode 100644
index 0000000000..79309febc7
--- /dev/null
+++ b/modules/rostests/winetests/user32/precomp.h
@@ -0,0 +1,16 @@
+#ifndef _USER32_APITEST_PRECOMP_H_
+#define _USER32_APITEST_PRECOMP_H_
+
+#include <assert.h>
+#include <stdarg.h>
+#include <stdio.h>
+
+#define STRICT
+#define WIN32_LEAN_AND_MEAN
+#define WINE_NOWINSOCK
+#include <windows.h>
+
+#define WINE_NO_INLINE_RECT
+#include <wine/test.h>
+
+#endif /* _USER32_APITEST_PRECOMP_H_ */
diff --git a/modules/rostests/winetests/user32/resource.c
b/modules/rostests/winetests/user32/resource.c
index 2388adb64f..049f6653b8 100755
--- a/modules/rostests/winetests/user32/resource.c
+++ b/modules/rostests/winetests/user32/resource.c
@@ -18,10 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <assert.h>
-#include <windows.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static UINT (WINAPI *pPrivateExtractIconsA)(LPCSTR, int, int, int, HICON *, UINT *, UINT,
UINT) = NULL;
diff --git a/modules/rostests/winetests/user32/scroll.c
b/modules/rostests/winetests/user32/scroll.c
index 0bda5dd0f4..f95cbb700e 100644
--- a/modules/rostests/winetests/user32/scroll.c
+++ b/modules/rostests/winetests/user32/scroll.c
@@ -18,12 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <windows.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static HWND hScroll;
static BOOL bThemeActive = FALSE;
diff --git a/modules/rostests/winetests/user32/static.c
b/modules/rostests/winetests/user32/static.c
index 929b50d694..0a58b38fe7 100644
--- a/modules/rostests/winetests/user32/static.c
+++ b/modules/rostests/winetests/user32/static.c
@@ -17,14 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-
-#define STRICT
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-#include "wine/test.h"
+#include "precomp.h"
#define TODO_COUNT 1
diff --git a/modules/rostests/winetests/user32/sysparams.c
b/modules/rostests/winetests/user32/sysparams.c
index 350497bd45..e9a69e6703 100755
--- a/modules/rostests/winetests/user32/sysparams.c
+++ b/modules/rostests/winetests/user32/sysparams.c
@@ -16,24 +16,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0600 /* For SPI_GETMOUSEHOVERWIDTH and more */
-//#define _WIN32_IE 0x0700
-#undef WINVER
-#define WINVER 0x0600 /* For COLOR_MENUBAR, NONCLIENTMETRICS with padding */
-
-#include <assert.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winreg.h"
-#include "winuser.h"
-#include "winnls.h"
+
+#include "precomp.h"
#ifndef SPI_GETDESKWALLPAPER
# define SPI_GETDESKWALLPAPER 0x0073
diff --git a/modules/rostests/winetests/user32/text.c
b/modules/rostests/winetests/user32/text.c
index 3cc9571521..ce60c64b56 100755
--- a/modules/rostests/winetests/user32/text.c
+++ b/modules/rostests/winetests/user32/text.c
@@ -19,14 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <assert.h>
-
-#include "wine/test.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winerror.h"
-#include "winnls.h"
+#include "precomp.h"
#define MODIFIED(rect) (rect.left == 10 && rect.right != 100 && rect.top
== 10 && rect.bottom != 100)
#define EMPTY(rect) (rect.left == rect.right && rect.bottom == rect.top)
diff --git a/modules/rostests/winetests/user32/uitools.c
b/modules/rostests/winetests/user32/uitools.c
index b52fe3a03a..05bc45c78a 100644
--- a/modules/rostests/winetests/user32/uitools.c
+++ b/modules/rostests/winetests/user32/uitools.c
@@ -17,11 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WINE_NO_INLINE_RECT
-#include "wine/test.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
+#include "precomp.h"
static void test_FillRect(void)
{
diff --git a/modules/rostests/winetests/user32/win.c
b/modules/rostests/winetests/user32/win.c
index 7b34dc17c8..74fb11251d 100644
--- a/modules/rostests/winetests/user32/win.c
+++ b/modules/rostests/winetests/user32/win.c
@@ -20,20 +20,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-/* To get ICON_SMALL2 with the MSVC headers */
-//#define _WIN32_WINNT 0x0501
-
-#include <assert.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-
-#include "wine/test.h"
+#include "precomp.h"
#ifndef SPI_GETDESKWALLPAPER
#define SPI_GETDESKWALLPAPER 0x0073
diff --git a/modules/rostests/winetests/user32/winstation.c
b/modules/rostests/winetests/user32/winstation.c
index 8522825a21..3e0fe936b5 100755
--- a/modules/rostests/winetests/user32/winstation.c
+++ b/modules/rostests/winetests/user32/winstation.c
@@ -18,12 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "wine/test.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-#include "wine/winternl.h"
+#include "precomp.h"
+
+#include <wine/winternl.h>
static NTSTATUS (WINAPI *pNtQueryObject)(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG,
PULONG);
diff --git a/modules/rostests/winetests/user32/wsprintf.c
b/modules/rostests/winetests/user32/wsprintf.c
index f0e80b2ad6..694814db5f 100755
--- a/modules/rostests/winetests/user32/wsprintf.c
+++ b/modules/rostests/winetests/user32/wsprintf.c
@@ -17,13 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winuser.h"
-#include "winnls.h"
+#include "precomp.h"
static const struct
{