[USER32_WINETEST] Add a PCH.
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 9 Dec 2017 12:58:55 +0000 (13:58 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 9 Dec 2017 12:58:55 +0000 (13:58 +0100)
26 files changed:
modules/rostests/winetests/user32/CMakeLists.txt
modules/rostests/winetests/user32/broadcast.c
modules/rostests/winetests/user32/class.c
modules/rostests/winetests/user32/clipboard.c
modules/rostests/winetests/user32/combo.c
modules/rostests/winetests/user32/cursoricon.c
modules/rostests/winetests/user32/dce.c
modules/rostests/winetests/user32/dde.c
modules/rostests/winetests/user32/dialog.c
modules/rostests/winetests/user32/edit.c
modules/rostests/winetests/user32/generated.c
modules/rostests/winetests/user32/input.c
modules/rostests/winetests/user32/listbox.c
modules/rostests/winetests/user32/menu.c
modules/rostests/winetests/user32/monitor.c
modules/rostests/winetests/user32/msg.c
modules/rostests/winetests/user32/precomp.h [new file with mode: 0644]
modules/rostests/winetests/user32/resource.c
modules/rostests/winetests/user32/scroll.c
modules/rostests/winetests/user32/static.c
modules/rostests/winetests/user32/sysparams.c
modules/rostests/winetests/user32/text.c
modules/rostests/winetests/user32/uitools.c
modules/rostests/winetests/user32/win.c
modules/rostests/winetests/user32/winstation.c
modules/rostests/winetests/user32/wsprintf.c

index 041e696..fc73d16 100644 (file)
@@ -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)
index a18f11a..d404150 100644 (file)
  * 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 );
index 8f316aa..0d358c2 100755 (executable)
  * 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
 
index 591a47c..f4aa4a6 100755 (executable)
  * 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
 
index 7c91f7f..6f42108 100644 (file)
  * 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
 
index 61b32e0..11c89c3 100644 (file)
  * 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"
 
index 382d10a..92f320c 100755 (executable)
  * 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
index d63a0f6..ab76117 100755 (executable)
  * 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};
 
index 882e5a3..f18e626 100755 (executable)
  * 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];
index b9aa1c9..012051c 100755 (executable)
  * 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
index 174d4dc..e80277c 100644 (file)
@@ -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
index 807a29a..239cc09 100755 (executable)
  *
  */
 
-//#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;
index 91d4675..7033aa6 100644 (file)
  * 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)
index 4323ae7..f3aac55 100755 (executable)
  * 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;
 
index 886d63c..313e78c 100644 (file)
  * 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);
index e0512ff..722f8d4 100755 (executable)
  * 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 (file)
index 0000000..79309fe
--- /dev/null
@@ -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_ */
index 2388adb..049f665 100755 (executable)
  * 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;
 
index 0bda5dd..f95cbb7 100644 (file)
  * 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;
index 929b50d..0a58b38 100644 (file)
  * 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
 
index 350497b..e9a69e6 100755 (executable)
  * 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
index 3cc9571..ce60c64 100755 (executable)
  * 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)
index b52fe3a..05bc45c 100644 (file)
  * 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)
 {
index 7b34dc1..74fb112 100644 (file)
  * 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
index 8522825..3e0fe93 100755 (executable)
  * 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);
 
index f0e80b2..694814d 100755 (executable)
  * 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
 {