https://git.reactos.org/?p=reactos.git;a=commitdiff;h=95ec9464d3af01d9e7606…
commit 95ec9464d3af01d9e7606fe4465230a22fc508ec
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun Dec 17 13:20:00 2017 +0100
[GDI32_WINETEST] Add a PCH.
---
modules/rostests/winetests/gdi32/CMakeLists.txt | 9 +++++++--
modules/rostests/winetests/gdi32/bitmap.c | 17 ++---------------
modules/rostests/winetests/gdi32/brush.c | 9 +--------
modules/rostests/winetests/gdi32/clipping.c | 5 +----
modules/rostests/winetests/gdi32/dc.c | 15 ++-------------
modules/rostests/winetests/gdi32/dib.c | 15 +++------------
modules/rostests/winetests/gdi32/font.c | 11 ++---------
modules/rostests/winetests/gdi32/gdiobj.c | 10 +---------
modules/rostests/winetests/gdi32/generated.c | 10 +---------
modules/rostests/winetests/gdi32/icm.c | 9 +--------
modules/rostests/winetests/gdi32/mapping.c | 9 +--------
modules/rostests/winetests/gdi32/metafile.c | 10 +---------
modules/rostests/winetests/gdi32/palette.c | 10 +---------
modules/rostests/winetests/gdi32/path.c | 12 +-----------
modules/rostests/winetests/gdi32/pen.c | 9 +--------
modules/rostests/winetests/gdi32/precomp.h | 16 ++++++++++++++++
16 files changed, 42 insertions(+), 134 deletions(-)
diff --git a/modules/rostests/winetests/gdi32/CMakeLists.txt
b/modules/rostests/winetests/gdi32/CMakeLists.txt
index 79cdf3125d..b9a497434d 100644
--- a/modules/rostests/winetests/gdi32/CMakeLists.txt
+++ b/modules/rostests/winetests/gdi32/CMakeLists.txt
@@ -16,9 +16,13 @@ list(APPEND SOURCE
palette.c
path.c
pen.c
- testlist.c)
+ precomp.h)
+
+add_executable(gdi32_winetest
+ ${SOURCE}
+ testlist.c
+ resource.rc)
-add_executable(gdi32_winetest ${SOURCE} resource.rc)
set_module_type(gdi32_winetest win32cui)
add_importlibs(gdi32_winetest gdi32 user32 advapi32 msvcrt kernel32)
@@ -26,4 +30,5 @@ if(MSVC)
add_importlibs(gdi32_winetest ntdll)
endif()
+add_pch(gdi32_winetest precomp.h SOURCE)
add_rostests_file(TARGET gdi32_winetest)
diff --git a/modules/rostests/winetests/gdi32/bitmap.c
b/modules/rostests/winetests/gdi32/bitmap.c
index 2b01e74e42..49460506f5 100755
--- a/modules/rostests/winetests/gdi32/bitmap.c
+++ b/modules/rostests/winetests/gdi32/bitmap.c
@@ -19,25 +19,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "mmsystem.h"
-#include "wine/winternl.h"
+#include "precomp.h"
+
#ifndef __REACTOS__ /* CORE-11331 */
#include "wine/ddk/d3dkmthk.h"
#endif
-#include "wine/test.h"
-
#ifndef __REACTOS__ /* CORE-11331 */
static NTSTATUS (WINAPI *pD3DKMTCreateDCFromMemory)( D3DKMT_CREATEDCFROMMEMORY *desc );
static NTSTATUS (WINAPI *pD3DKMTDestroyDCFromMemory)( const D3DKMT_DESTROYDCFROMMEMORY
*desc );
diff --git a/modules/rostests/winetests/gdi32/brush.c
b/modules/rostests/winetests/gdi32/brush.c
index 1a10429c05..7420995316 100755
--- a/modules/rostests/winetests/gdi32/brush.c
+++ b/modules/rostests/winetests/gdi32/brush.c
@@ -18,14 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-
-#include "wine/test.h"
+#include "precomp.h"
typedef struct _STOCK_BRUSH {
COLORREF color;
diff --git a/modules/rostests/winetests/gdi32/clipping.c
b/modules/rostests/winetests/gdi32/clipping.c
index 60bd31e8e4..02b39e3c12 100644
--- a/modules/rostests/winetests/gdi32/clipping.c
+++ b/modules/rostests/winetests/gdi32/clipping.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 void test_GetRandomRgn(void)
{
diff --git a/modules/rostests/winetests/gdi32/dc.c
b/modules/rostests/winetests/gdi32/dc.c
index d24898929e..7f9c91ac36 100644
--- a/modules/rostests/winetests/gdi32/dc.c
+++ b/modules/rostests/winetests/gdi32/dc.c
@@ -19,20 +19,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "precomp.h"
-#define WINVER 0x0501 /* request latest DEVMODE */
-#define NONAMELESSSTRUCT
-#define NONAMELESSUNION
-
-#include <assert.h>
-#include <stdio.h>
-
-#include "wine/test.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winspool.h"
-#include "winerror.h"
+#include <winspool.h>
#ifndef LAYOUT_LTR
#define LAYOUT_LTR 0
diff --git a/modules/rostests/winetests/gdi32/dib.c
b/modules/rostests/winetests/gdi32/dib.c
index 5ef63586d6..0ec9e58e37 100644
--- a/modules/rostests/winetests/gdi32/dib.c
+++ b/modules/rostests/winetests/gdi32/dib.c
@@ -18,18 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-#include <math.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "wincrypt.h"
-#include "mmsystem.h" /* DIBINDEX */
-
-#include "wine/test.h"
+#include "precomp.h"
+
+#include <wincrypt.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
diff --git a/modules/rostests/winetests/gdi32/font.c
b/modules/rostests/winetests/gdi32/font.c
index 70708d5438..61ee6f3ed8 100644
--- a/modules/rostests/winetests/gdi32/font.c
+++ b/modules/rostests/winetests/gdi32/font.c
@@ -19,16 +19,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <assert.h>
+#include "precomp.h"
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-
-#include "wine/test.h"
+#include <winnls.h>
static inline BOOL match_off_by_n(int a, int b, unsigned int n)
{
diff --git a/modules/rostests/winetests/gdi32/gdiobj.c
b/modules/rostests/winetests/gdi32/gdiobj.c
index 65374ea85d..729a96d40b 100755
--- a/modules/rostests/winetests/gdi32/gdiobj.c
+++ b/modules/rostests/winetests/gdi32/gdiobj.c
@@ -19,15 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <assert.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-
-#include "wine/test.h"
+#include "precomp.h"
static void test_gdi_objects(void)
{
diff --git a/modules/rostests/winetests/gdi32/generated.c
b/modules/rostests/winetests/gdi32/generated.c
index 019524df86..1507be9843 100644
--- a/modules/rostests/winetests/gdi32/generated.c
+++ b/modules/rostests/winetests/gdi32/generated.c
@@ -5,15 +5,7 @@
* Unit tests for data structure packing
*/
-#define WINVER 0x0501
-#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/gdi32/icm.c
b/modules/rostests/winetests/gdi32/icm.c
index 620809018a..76ba1adbba 100644
--- a/modules/rostests/winetests/gdi32/icm.c
+++ b/modules/rostests/winetests/gdi32/icm.c
@@ -18,14 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winuser.h"
-#include "wingdi.h"
-
-#include "wine/test.h"
+#include "precomp.h"
static const WCHAR displayW[] =
{'D','I','S','P','L','A','Y',0};
diff --git a/modules/rostests/winetests/gdi32/mapping.c
b/modules/rostests/winetests/gdi32/mapping.c
index 6635a72c18..810c1b0fee 100644
--- a/modules/rostests/winetests/gdi32/mapping.c
+++ b/modules/rostests/winetests/gdi32/mapping.c
@@ -19,14 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-#include <math.h>
-
-#include "wine/test.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winerror.h"
+#include "precomp.h"
static DWORD (WINAPI *pSetLayout)(HDC hdc, DWORD layout);
static DWORD (WINAPI *pGetLayout)(HDC hdc);
diff --git a/modules/rostests/winetests/gdi32/metafile.c
b/modules/rostests/winetests/gdi32/metafile.c
index eeec79c800..c7da7bf54f 100755
--- a/modules/rostests/winetests/gdi32/metafile.c
+++ b/modules/rostests/winetests/gdi32/metafile.c
@@ -18,15 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <assert.h>
-#include <stdio.h>
-#include <math.h>
-
-#include "wine/test.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winerror.h"
+#include "precomp.h"
static LOGFONTA orig_lf;
static BOOL emr_processed = FALSE;
diff --git a/modules/rostests/winetests/gdi32/palette.c
b/modules/rostests/winetests/gdi32/palette.c
index 045f5300b1..a4e4f364bb 100644
--- a/modules/rostests/winetests/gdi32/palette.c
+++ b/modules/rostests/winetests/gdi32/palette.c
@@ -18,15 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "mmsystem.h"
-
-#include "wine/test.h"
+#include "precomp.h"
static const PALETTEENTRY logpalettedata[8] = {
{ 0x10, 0x20, 0x30, PC_NOCOLLAPSE },
diff --git a/modules/rostests/winetests/gdi32/path.c
b/modules/rostests/winetests/gdi32/path.c
index 48ef4f016a..78bf7ae632 100644
--- a/modules/rostests/winetests/gdi32/path.c
+++ b/modules/rostests/winetests/gdi32/path.c
@@ -19,17 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-#include <assert.h>
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-
-#include "wine/test.h"
-
-#include "winuser.h"
-#include "winerror.h"
+#include "precomp.h"
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n",
expected, got)
diff --git a/modules/rostests/winetests/gdi32/pen.c
b/modules/rostests/winetests/gdi32/pen.c
index 43f00d8f50..1937e4030c 100644
--- a/modules/rostests/winetests/gdi32/pen.c
+++ b/modules/rostests/winetests/gdi32/pen.c
@@ -18,14 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-
-#include "wine/test.h"
+#include "precomp.h"
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n",
expected, got)
#define expect2(expected, alt, got) ok(got == expected || got == alt, \
diff --git a/modules/rostests/winetests/gdi32/precomp.h
b/modules/rostests/winetests/gdi32/precomp.h
new file mode 100644
index 0000000000..11e9e70e51
--- /dev/null
+++ b/modules/rostests/winetests/gdi32/precomp.h
@@ -0,0 +1,16 @@
+#ifndef _GDI32_WINETEST_PRECOMP_H_
+#define _GDI32_WINETEST_PRECOMP_H_
+
+#define WIN32_NO_STATUS
+#define NONAMELESSUNION
+
+#include <assert.h>
+#include <stdio.h>
+#include <math.h>
+
+#include <wine/test.h>
+#include <wingdi.h>
+#include <winuser.h>
+#include <mmsystem.h>
+
+#endif /* !_GDI32_WINETEST_PRECOMP_H_ */