https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7ce46d59b48290591f395…
commit 7ce46d59b48290591f39536acbfc7108ea265366
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Thu Dec 21 13:57:22 2017 +0100
[WINDOWSCODECS_WINETEST] Add a PCH.
---
.../winetests/windowscodecs/CMakeLists.txt | 11 ++++++++---
modules/rostests/winetests/windowscodecs/bitmap.c | 19 +------------------
.../rostests/winetests/windowscodecs/bmpformat.c | 17 +----------------
.../rostests/winetests/windowscodecs/converter.c | 18 +-----------------
.../rostests/winetests/windowscodecs/gifformat.c | 15 +--------------
modules/rostests/winetests/windowscodecs/guid.c | 12 ++++++++++++
.../rostests/winetests/windowscodecs/icoformat.c | 15 +--------------
modules/rostests/winetests/windowscodecs/info.c | 17 +----------------
.../rostests/winetests/windowscodecs/metadata.c | 18 +-----------------
modules/rostests/winetests/windowscodecs/palette.c | 15 +--------------
.../rostests/winetests/windowscodecs/pngformat.c | 17 ++---------------
modules/rostests/winetests/windowscodecs/precomp.h | 22 ++++++++++++++++++++++
.../rostests/winetests/windowscodecs/propertybag.c | 17 +----------------
modules/rostests/winetests/windowscodecs/stream.c | 10 +---------
.../rostests/winetests/windowscodecs/tiffformat.c | 15 +--------------
15 files changed, 55 insertions(+), 183 deletions(-)
diff --git a/modules/rostests/winetests/windowscodecs/CMakeLists.txt
b/modules/rostests/winetests/windowscodecs/CMakeLists.txt
index c9a8518334..293a437853 100644
--- a/modules/rostests/winetests/windowscodecs/CMakeLists.txt
+++ b/modules/rostests/winetests/windowscodecs/CMakeLists.txt
@@ -13,10 +13,14 @@ list(APPEND SOURCE
pngformat.c
propertybag.c
stream.c
- testlist.c
- tiffformat.c)
+ tiffformat.c
+ precomp.h)
+
+add_executable(windowscodecs_winetest
+ ${SOURCE}
+ guid.c
+ testlist.c)
-add_executable(windowscodecs_winetest ${SOURCE})
set_module_type(windowscodecs_winetest win32cui)
add_importlibs(windowscodecs_winetest windowscodecs oleaut32 ole32 propsys user32 gdi32
shlwapi msvcrt kernel32)
@@ -24,4 +28,5 @@ if(MSVC)
add_importlibs(windowscodecs_winetest ntdll)
endif()
+add_pch(windowscodecs_winetest precomp.h SOURCE)
add_rostests_file(TARGET windowscodecs_winetest)
diff --git a/modules/rostests/winetests/windowscodecs/bitmap.c
b/modules/rostests/winetests/windowscodecs/bitmap.c
index a6655a6877..b35c07fbf1 100644
--- a/modules/rostests/winetests/windowscodecs/bitmap.c
+++ b/modules/rostests/winetests/windowscodecs/bitmap.c
@@ -17,24 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdarg.h>
-#include <stdio.h>
-#include <assert.h>
-//#include <math.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <objbase.h>
-#include <wincodec.h>
-#include <wine/test.h>
+#include "precomp.h"
static IWICImagingFactory *factory;
diff --git a/modules/rostests/winetests/windowscodecs/bmpformat.c
b/modules/rostests/winetests/windowscodecs/bmpformat.c
index f7565e0da7..afa2bd92b8 100644
--- a/modules/rostests/winetests/windowscodecs/bmpformat.c
+++ b/modules/rostests/winetests/windowscodecs/bmpformat.c
@@ -16,22 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <math.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <windef.h>
-#include <winbase.h>
-#include <initguid.h>
-#include <ole2.h>
-//#include "wincodec.h"
-#include <wincodecsdk.h>
-#include <wine/test.h>
+#include "precomp.h"
static const char testbmp_24bpp[] = {
/* BITMAPFILEHEADER */
diff --git a/modules/rostests/winetests/windowscodecs/converter.c
b/modules/rostests/winetests/windowscodecs/converter.c
index 1f44513262..baa7a9d3c4 100644
--- a/modules/rostests/winetests/windowscodecs/converter.c
+++ b/modules/rostests/winetests/windowscodecs/converter.c
@@ -17,23 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-#include <math.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <ole2.h>
-#include <wincodecsdk.h>
-#include <wine/test.h>
+#include "precomp.h"
static IWICImagingFactory *factory;
diff --git a/modules/rostests/winetests/windowscodecs/gifformat.c
b/modules/rostests/winetests/windowscodecs/gifformat.c
index 4b75d06470..3af0a80707 100644
--- a/modules/rostests/winetests/windowscodecs/gifformat.c
+++ b/modules/rostests/winetests/windowscodecs/gifformat.c
@@ -16,20 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <windef.h>
-#include <winbase.h>
-#include <ole2.h>
-#include <wincodec.h>
-#include <wine/test.h>
+#include "precomp.h"
HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory**);
diff --git a/modules/rostests/winetests/windowscodecs/guid.c
b/modules/rostests/winetests/windowscodecs/guid.c
new file mode 100644
index 0000000000..18f2768265
--- /dev/null
+++ b/modules/rostests/winetests/windowscodecs/guid.c
@@ -0,0 +1,12 @@
+/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+
+#include <windef.h>
+#include <winbase.h>
+#include <initguid.h>
+#include <objbase.h>
+#include <wincodecsdk.h>
+
+/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
diff --git a/modules/rostests/winetests/windowscodecs/icoformat.c
b/modules/rostests/winetests/windowscodecs/icoformat.c
index 9bbedc03fb..c614898131 100644
--- a/modules/rostests/winetests/windowscodecs/icoformat.c
+++ b/modules/rostests/winetests/windowscodecs/icoformat.c
@@ -16,20 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-//#include <math.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <windef.h>
-#include <winbase.h>
-#include <objbase.h>
-#include <wincodec.h>
-#include <wine/test.h>
+#include "precomp.h"
static unsigned char testico_bad_icondirentry_size[] = {
/* ICONDIR */
diff --git a/modules/rostests/winetests/windowscodecs/info.c
b/modules/rostests/winetests/windowscodecs/info.c
index e1a3a5980b..83b729adaf 100644
--- a/modules/rostests/winetests/windowscodecs/info.c
+++ b/modules/rostests/winetests/windowscodecs/info.c
@@ -16,22 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-//#include <stdarg.h>
-//#include <math.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <windef.h>
-#include <winbase.h>
-#include <objbase.h>
-//#include "wincodec.h"
-#include <wincodecsdk.h>
-#include <wine/test.h>
+#include "precomp.h"
#include <initguid.h>
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
diff --git a/modules/rostests/winetests/windowscodecs/metadata.c
b/modules/rostests/winetests/windowscodecs/metadata.c
index f47036185e..9de1c4d31e 100644
--- a/modules/rostests/winetests/windowscodecs/metadata.c
+++ b/modules/rostests/winetests/windowscodecs/metadata.c
@@ -17,26 +17,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-//#include <stdarg.h>
-//#include <math.h>
-#include <assert.h>
+#include "precomp.h"
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <windef.h>
-#include <winbase.h>
#include <winnls.h>
-#include <winreg.h>
-#include <ole2.h>
-//#include "wincodec.h"
-#include <wincodecsdk.h>
#include <propvarutil.h>
-#include <wine/test.h>
#include <initguid.h>
DEFINE_GUID(IID_MdbrUnknown,
0x00240e6f,0x3f23,0x4432,0xb0,0xcc,0x48,0xd5,0xbb,0xff,0x6c,0x36);
diff --git a/modules/rostests/winetests/windowscodecs/palette.c
b/modules/rostests/winetests/windowscodecs/palette.c
index 7302d72582..46d3bc8343 100644
--- a/modules/rostests/winetests/windowscodecs/palette.c
+++ b/modules/rostests/winetests/windowscodecs/palette.c
@@ -17,20 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <assert.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <windef.h>
-#include <winbase.h>
-#include <objbase.h>
-#include <wincodec.h>
-#include <wine/test.h>
+#include "precomp.h"
static IWICImagingFactory *factory;
diff --git a/modules/rostests/winetests/windowscodecs/pngformat.c
b/modules/rostests/winetests/windowscodecs/pngformat.c
index 4fd8489896..95ead41324 100644
--- a/modules/rostests/winetests/windowscodecs/pngformat.c
+++ b/modules/rostests/winetests/windowscodecs/pngformat.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2012,2016 Dmitry Timoshkov
+ * Copyright 2012, 2016 Dmitry Timoshkov
* Copyright 2012 Hans Leidekker for CodeWeavers
*
* This library is free software; you can redistribute it and/or
@@ -17,21 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdarg.h>
-#include <stdio.h>
+#include "precomp.h"
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <windef.h>
-#include <winbase.h>
-#include <ole2.h>
-#include <wincodec.h>
-#include <wine/test.h>
-#include <winreg.h>
#include <shlwapi.h>
/* 1x1 pixel PNG image */
diff --git a/modules/rostests/winetests/windowscodecs/precomp.h
b/modules/rostests/winetests/windowscodecs/precomp.h
new file mode 100644
index 0000000000..59d037ab1f
--- /dev/null
+++ b/modules/rostests/winetests/windowscodecs/precomp.h
@@ -0,0 +1,22 @@
+#ifndef _WINDOWSCODECS_WINETEST_PRECOMP_H_
+#define _WINDOWSCODECS_WINETEST_PRECOMP_H_
+
+#include <assert.h>
+#include <math.h>
+#include <stdio.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#define COBJMACROS
+#define CONST_VTABLE
+
+#include <wine/test.h>
+
+#include <wingdi.h>
+#include <winreg.h>
+#include <ole2.h>
+#include <wincodecsdk.h>
+
+#endif /* _WINDOWSCODECS_WINETEST_PRECOMP_H_ */
diff --git a/modules/rostests/winetests/windowscodecs/propertybag.c
b/modules/rostests/winetests/windowscodecs/propertybag.c
index 1caee57259..b0a3bd3415 100644
--- a/modules/rostests/winetests/windowscodecs/propertybag.c
+++ b/modules/rostests/winetests/windowscodecs/propertybag.c
@@ -16,22 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-//#include <math.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <windef.h>
-#include <winbase.h>
-#include <ole2.h>
-//#include "wincodec.h"
-#include <wincodecsdk.h>
-#include <wine/test.h>
+#include "precomp.h"
static const WCHAR wszTestProperty1[] =
{'P','r','o','p','e','r','t','y','1',0};
static const WCHAR wszTestProperty2[] =
{'P','r','o','p','e','r','t','y','2',0};
diff --git a/modules/rostests/winetests/windowscodecs/stream.c
b/modules/rostests/winetests/windowscodecs/stream.c
index 8b013c16cb..70807aab64 100644
--- a/modules/rostests/winetests/windowscodecs/stream.c
+++ b/modules/rostests/winetests/windowscodecs/stream.c
@@ -16,15 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <wine/test.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#include <ole2.h>
-#include <wincodec.h>
+#include "precomp.h"
static void test_StreamOnMemory(void)
{
diff --git a/modules/rostests/winetests/windowscodecs/tiffformat.c
b/modules/rostests/winetests/windowscodecs/tiffformat.c
index bc78182fc2..81bd6409e0 100644
--- a/modules/rostests/winetests/windowscodecs/tiffformat.c
+++ b/modules/rostests/winetests/windowscodecs/tiffformat.c
@@ -16,20 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include <stdarg.h>
-#include <stdio.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <windef.h>
-#include <winbase.h>
-#include <ole2.h>
-#include <wincodec.h>
-#include <wine/test.h>
+#include "precomp.h"
#define IFD_BYTE 1
#define IFD_ASCII 2