https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d3626819e6a301eb2a7b7…
commit d3626819e6a301eb2a7b7fe20bbc0bc518d52667
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Thu Dec 21 13:55:57 2017 +0100
[MSXML3_WINETEST] Add a PCH.
---
modules/rostests/winetests/msxml3/CMakeLists.txt | 7 ++++---
modules/rostests/winetests/msxml3/domdoc.c | 23 +--------------------
modules/rostests/winetests/msxml3/httpreq.c | 25 +----------------------
modules/rostests/winetests/msxml3/precomp.h | 26 ++++++++++++++++++++++++
modules/rostests/winetests/msxml3/saxreader.c | 21 +++----------------
modules/rostests/winetests/msxml3/schema.c | 20 +-----------------
modules/rostests/winetests/msxml3/xmldoc.c | 16 +--------------
modules/rostests/winetests/msxml3/xmlparser.c | 16 +--------------
modules/rostests/winetests/msxml3/xmlview.c | 23 +++------------------
9 files changed, 41 insertions(+), 136 deletions(-)
diff --git a/modules/rostests/winetests/msxml3/CMakeLists.txt
b/modules/rostests/winetests/msxml3/CMakeLists.txt
index 7fee075ca8..2d824189bd 100644
--- a/modules/rostests/winetests/msxml3/CMakeLists.txt
+++ b/modules/rostests/winetests/msxml3/CMakeLists.txt
@@ -8,12 +8,12 @@ list(APPEND SOURCE
httpreq.c
saxreader.c
schema.c
- testlist.c
xmldoc.c
xmlparser.c
- xmlview.c)
+ xmlview.c
+ precomp.h)
-add_executable(msxml3_winetest ${SOURCE} rsrc.rc)
+add_executable(msxml3_winetest ${SOURCE} testlist.c rsrc.rc)
add_idl_headers(xmlparser_idlheader_test xmlparser.idl)
add_dependencies(msxml3_winetest xmlparser_idlheader_test)
set_module_type(msxml3_winetest win32cui)
@@ -23,4 +23,5 @@ if(MSVC)
add_importlibs(msxml3_winetest ntdll)
endif()
+add_pch(msxml3_winetest precomp.h SOURCE)
add_rostests_file(TARGET msxml3_winetest)
diff --git a/modules/rostests/winetests/msxml3/domdoc.c
b/modules/rostests/winetests/msxml3/domdoc.c
index 3e88e3315c..cf0869f263 100644
--- a/modules/rostests/winetests/msxml3/domdoc.c
+++ b/modules/rostests/winetests/msxml3/domdoc.c
@@ -21,29 +21,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "precomp.h"
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <stdio.h>
-#include <assert.h>
-
-//#include "windows.h"
-
-#include <wine/test.h>
-
-#include <winnls.h>
-#include <ole2.h>
-#include <msxml.h>
-#include <msxml2.h>
-#include <msxml2did.h>
-#include <dispex.h>
-#include <objsafe.h>
-#include <initguid.h>
#include <asptlb.h>
/* undef the #define in msxml2 so that we can access all versions */
diff --git a/modules/rostests/winetests/msxml3/httpreq.c
b/modules/rostests/winetests/msxml3/httpreq.c
index a17e627bcf..8d97a48cd7 100644
--- a/modules/rostests/winetests/msxml3/httpreq.c
+++ b/modules/rostests/winetests/msxml3/httpreq.c
@@ -18,30 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <stdio.h>
-#include <assert.h>
-
-//#include "windows.h"
-
-#include <wine/test.h>
-
-#include <winnls.h>
-#include <wingdi.h>
-#include <ole2.h>
-//#include "msxml2.h"
-//#include "msxml2did.h"
-//#include "dispex.h"
-#include <initguid.h>
-#include <objsafe.h>
-#include <mshtml.h>
-
+#include "precomp.h"
#define EXPECT_HR(hr,hr_exp) \
ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
diff --git a/modules/rostests/winetests/msxml3/precomp.h
b/modules/rostests/winetests/msxml3/precomp.h
new file mode 100644
index 0000000000..888b1e625e
--- /dev/null
+++ b/modules/rostests/winetests/msxml3/precomp.h
@@ -0,0 +1,26 @@
+#ifndef _MSXML3_WINETEST_PRECOMP_H_
+#define _MSXML3_WINETEST_PRECOMP_H_
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#define COBJMACROS
+#define CONST_VTABLE
+
+#include <stdio.h>
+#include <assert.h>
+
+#include <wine/test.h>
+
+#include <winnls.h>
+#include <wingdi.h>
+#include <initguid.h>
+#include <ole2.h>
+#include <msxml2.h>
+#include <msxml2did.h>
+#include <objsafe.h>
+#include <mshtml.h>
+#include <xmlparser.h>
+
+#endif /* !_MSXML3_WINETEST_PRECOMP_H_ */
diff --git a/modules/rostests/winetests/msxml3/saxreader.c
b/modules/rostests/winetests/msxml3/saxreader.c
index 28e278d706..ed0eedeae1 100644
--- a/modules/rostests/winetests/msxml3/saxreader.c
+++ b/modules/rostests/winetests/msxml3/saxreader.c
@@ -20,24 +20,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <stdio.h>
-#include <assert.h>
-
-#include <wine/test.h>
-//#include "windows.h"
-#include <winnls.h>
-#include <ole2.h>
-#include <msxml2.h>
-#include <msxml2did.h>
-//#include "ocidl.h"
-#include <dispex.h>
+#include "precomp.h"
+
+DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
static const WCHAR emptyW[] = {0};
diff --git a/modules/rostests/winetests/msxml3/schema.c
b/modules/rostests/winetests/msxml3/schema.c
index 9c785fd05d..e082b00f4c 100644
--- a/modules/rostests/winetests/msxml3/schema.c
+++ b/modules/rostests/winetests/msxml3/schema.c
@@ -19,25 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-//#include <stdio.h>
-#include <assert.h>
-#define COBJMACROS
-
-#include <wine/test.h>
-
-#include <initguid.h>
-//#include "windows.h"
-#include <winnls.h>
-#include <ole2.h>
-#include <msxml2.h>
-#undef CLSID_DOMDocument
-#include <msxml2did.h>
-#include <dispex.h>
-
+#include "precomp.h"
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
diff --git a/modules/rostests/winetests/msxml3/xmldoc.c
b/modules/rostests/winetests/msxml3/xmldoc.c
index f0fc66da52..ee031bc36e 100644
--- a/modules/rostests/winetests/msxml3/xmldoc.c
+++ b/modules/rostests/winetests/msxml3/xmldoc.c
@@ -18,21 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <wine/test.h>
-
-//#include <stdio.h>
-//#include "windows.h"
-#include <winnls.h>
-#include <ole2.h>
-#include <msxml2.h>
-#include <msxml2did.h>
-#include <ocidl.h>
+#include "precomp.h"
#define EXPECT_HR(hr,hr_exp) \
ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
diff --git a/modules/rostests/winetests/msxml3/xmlparser.c
b/modules/rostests/winetests/msxml3/xmlparser.c
index 8e93b420df..0bb2ecb0a9 100644
--- a/modules/rostests/winetests/msxml3/xmlparser.c
+++ b/modules/rostests/winetests/msxml3/xmlparser.c
@@ -18,21 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-//#include <stdio.h>
-//#include <assert.h>
-
-#include <wine/test.h>
-
-//#include "windows.h"
-#include <ole2.h>
-#include <xmlparser.h>
+#include "precomp.h"
static HRESULT WINAPI nodefact_QueryInterface(IXMLNodeFactory *iface,
REFIID riid, void **ppvObject)
diff --git a/modules/rostests/winetests/msxml3/xmlview.c
b/modules/rostests/winetests/msxml3/xmlview.c
index 12959a5edc..d3a0903e04 100644
--- a/modules/rostests/winetests/msxml3/xmlview.c
+++ b/modules/rostests/winetests/msxml3/xmlview.c
@@ -16,29 +16,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
+#include "precomp.h"
-#define COBJMACROS
-#define CONST_VTABLE
-
-//#include <stdio.h>
-//#include <assert.h>
-
-#include <wine/test.h>
-
-//#include "windows.h"
-#include <winnls.h>
-#include <wingdi.h>
-#include <ole2.h>
-#include <mshtml.h>
-#include <mshtmdid.h>
-#include <initguid.h>
#include <perhist.h>
#include <docobj.h>
-//#include "urlmon.h"
-#include <xmlparser.h>
+
+#define DISPID_HTMLDOCUMENTEVENTS2_ONREADYSTATECHANGE DISPID_READYSTATECHANGE
HRESULT (WINAPI *pCreateURLMoniker)(IMoniker*, LPCWSTR, IMoniker**);